SlideShare une entreprise Scribd logo
1  sur  19
Latency Kills
Optimize your apps for latency




Shishir Birmiwal
Software Engineer



                                 Google Confidential and Proprietary   1
Is latency that bad?
Why all the fuss?
Lets take a pop quiz!




                        Google Confidential and Proprietary   2
Question# 1




Have you closed a page
because it didn't load up in time?




                                     Google Confidential and Proprietary
Question# 2




Have you re-clicked links?




                             Google Confidential and Proprietary
Question# 3




How would you feel if you have to wait 15
seconds between views?




                                     Google Confidential and Proprietary
Latency Kills


• Amazon reported that 100ms of latency costs sales by 1%
• An additional 500ms latency saw Google search usage drop by 20%
• Users perceive Quality and Ease of Use with lower latency




                                                              Google Confidential and Proprietary
Sources of latency
Why do we have latency?




                          Google Confidential and Proprietary   7
Sources of latency



             fetch page
                                               gadget xml

             fetch gadget iframe

             fetch social data
    Client   fetch backend data    Container                            Application
   Browser                          (orkut)    backend data              Backend


               content render




                                                              Google Confidential and Proprietary
Kill latency
Optimize your app




                    Google Confidential and Proprietary   9
Optimize your app


• Batch requests
• Caches are your friends
• Minify static content
• Be lean and mean
• Think ahead
• Best practices




                            Google Confidential and Proprietary
Optimize your app


Batch Requests
Put multiple independent requests together
var idspec = opensocial.newIdSpec({ quot;userIdquot; : quot;OWNERquot;, quot;groupIdquot; : quot;FRIENDSquot; });
var fields = [ quot;AppField1quot;, quot;AppField2quot;, quot;AppField3quot; ];
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER), quot;get_ownerquot;);
req.add(req.newFetchPeopleRequest(idspec), quot;get_friendsquot;);
req.add(req.newFetchPersonAppDataRequest(idSpec, fields), quot;owner_dataquot;);
req.send(response);




                                                                  Google Confidential and Proprietary
Caches are your friends


Proxy Content
     Use gadgets.io.getProxyUrl(url) to get a proxy URL
     var imgUrl = gadgets.io.getProxyUrl('http://example.org/image.png');
     var html = '<img src=”' + imgUrl + '”>';

Content-rewrite
     Automatically rewrite URLs to fetch from cache
     <Optional feature=”content-rewrite”>
        <Param name=”include-urls”>.*</Param>
        <Param name=”exclude-urls”></Param>
        <Param name=”include-tags”>img,script,embed,link,style</Param>
     </Optional>

http://www.example.org/image.png becomes something like:
http://www1.orkut.gmodules.com/gadgets/proxy?url=http://example.org/image.png


                                                                          Google Confidential and Proprietary
Caches are your friends


Use cache effectively
• makeRequests are cached; specify refresh interval
• set HTTP cache-headers effectively

BYO cache
• store user specific data in app data – faster to access
• cache global info in app data
     e.g. high scores
     update content in app data from backend as required




                                                            Google Confidential and Proprietary
Optimize your apps


Minify static content
• re-compress images to smaller sizes
• serve smaller and gzipped JS/CSS files
• concat. JS/CSS files to reduce number of fetches
• include JS/CSS in gadget XML if possible




                                                     Google Confidential and Proprietary
Optimize your apps


Be lean and mean
lighter faster profile pages


• use images, not swfs
• use app data as cache
• use owner/viewer only signed makeRequest
• may choose to show owner-only data on profile pages
• don't load unnecessary files




                                                        Google Confidential and Proprietary
Think ahead


• Expect user requests and prefetch content
• Preload content from your servers
    <ModulePrefs ...>
       ...
       <Preload href=”http://example.com/topScores”>
    </ModulePrefs>
    or
    <Preload href=”http://example.com/myScores” authz=signed views=”profile,canvas”
      signViewer=false>




                                                                Google Confidential and Proprietary
Best practices


• Show a “loading gif” image when expecting the user to wait
• Put Stylesheets at top
• Put Scripts at bottom
• Post-load components
• Use Google's cached version of JS libraries




                                                               Google Confidential and Proprietary
Demo time


Firefox extensions are your friends!
• Firebug
• Live HTTP Headers
• YSlow




                                       Google Confidential and Proprietary
Thank You!
Optimize your app and save the day!




                                      Google Confidential and Proprietary   19

Contenu connexe

Tendances

How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...Hamlet Batista
 
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick StoxPubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stoxpatrickstox
 
Joomla 1.6 Core SEO and Best Practices
Joomla 1.6 Core SEO and Best PracticesJoomla 1.6 Core SEO and Best Practices
Joomla 1.6 Core SEO and Best PracticesFinishJoomla
 
Automating Google Lighthouse
Automating Google LighthouseAutomating Google Lighthouse
Automating Google LighthouseHamlet Batista
 
Split Testing for SEO - 9 Months of Learning
Split Testing for SEO - 9 Months of LearningSplit Testing for SEO - 9 Months of Learning
Split Testing for SEO - 9 Months of LearningDominic Woodman
 
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...Jamie Indigo
 
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersSearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersDistilled
 
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your LogsSearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your LogsDistilled
 
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick StoxSMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stoxpatrickstox
 
On-Page SEO EXTREME - SEOZone Istanbul 2013
On-Page SEO EXTREME - SEOZone Istanbul 2013On-Page SEO EXTREME - SEOZone Istanbul 2013
On-Page SEO EXTREME - SEOZone Istanbul 2013Bastian Grimm
 
Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020Simo Ahava
 
The New Renaissance of JavaScript
The New Renaissance of JavaScriptThe New Renaissance of JavaScript
The New Renaissance of JavaScriptHamlet Batista
 
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 201210 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 2012Bastian Grimm
 
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018patrickstox
 
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...Branded3
 
SEO dataLayer 2: Entity Wars
SEO dataLayer 2: Entity WarsSEO dataLayer 2: Entity Wars
SEO dataLayer 2: Entity WarsPhil Pearce
 
Technical SEO: Crawl Space Management - SEOZone Istanbul 2014
Technical SEO: Crawl Space Management - SEOZone Istanbul 2014Technical SEO: Crawl Space Management - SEOZone Istanbul 2014
Technical SEO: Crawl Space Management - SEOZone Istanbul 2014Bastian Grimm
 

Tendances (20)

How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
 
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick StoxPubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
 
Joomla 1.6 Core SEO and Best Practices
Joomla 1.6 Core SEO and Best PracticesJoomla 1.6 Core SEO and Best Practices
Joomla 1.6 Core SEO and Best Practices
 
Joomla 1.7 SEO
Joomla 1.7 SEOJoomla 1.7 SEO
Joomla 1.7 SEO
 
Automating Google Lighthouse
Automating Google LighthouseAutomating Google Lighthouse
Automating Google Lighthouse
 
Split Testing for SEO - 9 Months of Learning
Split Testing for SEO - 9 Months of LearningSplit Testing for SEO - 9 Months of Learning
Split Testing for SEO - 9 Months of Learning
 
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
How Googlebot Renders (Roleplaying as Google's Web Rendering Service-- D&D st...
 
SEO for Large Websites
SEO for Large WebsitesSEO for Large Websites
SEO for Large Websites
 
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersSearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
 
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your LogsSearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
 
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick StoxSMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
 
On-Page SEO EXTREME - SEOZone Istanbul 2013
On-Page SEO EXTREME - SEOZone Istanbul 2013On-Page SEO EXTREME - SEOZone Istanbul 2013
On-Page SEO EXTREME - SEOZone Istanbul 2013
 
Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)
Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)
Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)
 
Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020
 
The New Renaissance of JavaScript
The New Renaissance of JavaScriptThe New Renaissance of JavaScript
The New Renaissance of JavaScript
 
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 201210 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
 
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
 
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
 
SEO dataLayer 2: Entity Wars
SEO dataLayer 2: Entity WarsSEO dataLayer 2: Entity Wars
SEO dataLayer 2: Entity Wars
 
Technical SEO: Crawl Space Management - SEOZone Istanbul 2014
Technical SEO: Crawl Space Management - SEOZone Istanbul 2014Technical SEO: Crawl Space Management - SEOZone Istanbul 2014
Technical SEO: Crawl Space Management - SEOZone Istanbul 2014
 

Similaire à Latency Kills by Shishir Birmiwal

Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101ikailan
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Ido Green
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munichdion
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional PerformanceNicole Sullivan
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
 
Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...MilanAryal
 
Administrators admin tips tricks and hacks presented by an ex-googler
Administrators admin tips tricks and hacks presented by an ex-googlerAdministrators admin tips tricks and hacks presented by an ex-googler
Administrators admin tips tricks and hacks presented by an ex-googlerzpurcey
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...e-Legion
 
Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebQConLondon2008
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1QConLondon2008
 
Open Source Web Technologies
Open Source Web TechnologiesOpen Source Web Technologies
Open Source Web TechnologiesAastha Sethi
 
Google Cloud for Data Crunchers - Strata Conf 2011
Google Cloud for Data Crunchers - Strata Conf 2011Google Cloud for Data Crunchers - Strata Conf 2011
Google Cloud for Data Crunchers - Strata Conf 2011Patrick Chanezon
 
Perspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - GooglePerspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - GoogleACMBangalore
 
What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? Oikailan
 
Jonathon Rochelle @ FOWA Feb 07
Jonathon Rochelle @ FOWA Feb 07Jonathon Rochelle @ FOWA Feb 07
Jonathon Rochelle @ FOWA Feb 07carsonsystems
 
Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...
Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...
Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...Amazon Web Services
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Natalia Efimtseva
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platformrajdeep
 
Open Social Summit Korea Overview
Open Social Summit Korea OverviewOpen Social Summit Korea Overview
Open Social Summit Korea OverviewChris Schalk
 

Similaire à Latency Kills by Shishir Birmiwal (20)

Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional Performance
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...
 
Administrators admin tips tricks and hacks presented by an ex-googler
Administrators admin tips tricks and hacks presented by an ex-googlerAdministrators admin tips tricks and hacks presented by an ex-googler
Administrators admin tips tricks and hacks presented by an ex-googler
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
Frontend SPOF
Frontend SPOFFrontend SPOF
Frontend SPOF
 
Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The Web
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1
 
Open Source Web Technologies
Open Source Web TechnologiesOpen Source Web Technologies
Open Source Web Technologies
 
Google Cloud for Data Crunchers - Strata Conf 2011
Google Cloud for Data Crunchers - Strata Conf 2011Google Cloud for Data Crunchers - Strata Conf 2011
Google Cloud for Data Crunchers - Strata Conf 2011
 
Perspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - GooglePerspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - Google
 
What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? O
 
Jonathon Rochelle @ FOWA Feb 07
Jonathon Rochelle @ FOWA Feb 07Jonathon Rochelle @ FOWA Feb 07
Jonathon Rochelle @ FOWA Feb 07
 
Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...
Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...
Learn How You Can Accelerate Engineering Workloads with AppStream 2.0 (BAP318...
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platform
 
Open Social Summit Korea Overview
Open Social Summit Korea OverviewOpen Social Summit Korea Overview
Open Social Summit Korea Overview
 

Dernier

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Latency Kills by Shishir Birmiwal

  • 1. Latency Kills Optimize your apps for latency Shishir Birmiwal Software Engineer Google Confidential and Proprietary 1
  • 2. Is latency that bad? Why all the fuss? Lets take a pop quiz! Google Confidential and Proprietary 2
  • 3. Question# 1 Have you closed a page because it didn't load up in time? Google Confidential and Proprietary
  • 4. Question# 2 Have you re-clicked links? Google Confidential and Proprietary
  • 5. Question# 3 How would you feel if you have to wait 15 seconds between views? Google Confidential and Proprietary
  • 6. Latency Kills • Amazon reported that 100ms of latency costs sales by 1% • An additional 500ms latency saw Google search usage drop by 20% • Users perceive Quality and Ease of Use with lower latency Google Confidential and Proprietary
  • 7. Sources of latency Why do we have latency? Google Confidential and Proprietary 7
  • 8. Sources of latency fetch page gadget xml fetch gadget iframe fetch social data Client fetch backend data Container Application Browser (orkut) backend data Backend content render Google Confidential and Proprietary
  • 9. Kill latency Optimize your app Google Confidential and Proprietary 9
  • 10. Optimize your app • Batch requests • Caches are your friends • Minify static content • Be lean and mean • Think ahead • Best practices Google Confidential and Proprietary
  • 11. Optimize your app Batch Requests Put multiple independent requests together var idspec = opensocial.newIdSpec({ quot;userIdquot; : quot;OWNERquot;, quot;groupIdquot; : quot;FRIENDSquot; }); var fields = [ quot;AppField1quot;, quot;AppField2quot;, quot;AppField3quot; ]; var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER), quot;get_ownerquot;); req.add(req.newFetchPeopleRequest(idspec), quot;get_friendsquot;); req.add(req.newFetchPersonAppDataRequest(idSpec, fields), quot;owner_dataquot;); req.send(response); Google Confidential and Proprietary
  • 12. Caches are your friends Proxy Content Use gadgets.io.getProxyUrl(url) to get a proxy URL var imgUrl = gadgets.io.getProxyUrl('http://example.org/image.png'); var html = '<img src=”' + imgUrl + '”>'; Content-rewrite Automatically rewrite URLs to fetch from cache <Optional feature=”content-rewrite”> <Param name=”include-urls”>.*</Param> <Param name=”exclude-urls”></Param> <Param name=”include-tags”>img,script,embed,link,style</Param> </Optional> http://www.example.org/image.png becomes something like: http://www1.orkut.gmodules.com/gadgets/proxy?url=http://example.org/image.png Google Confidential and Proprietary
  • 13. Caches are your friends Use cache effectively • makeRequests are cached; specify refresh interval • set HTTP cache-headers effectively BYO cache • store user specific data in app data – faster to access • cache global info in app data  e.g. high scores  update content in app data from backend as required Google Confidential and Proprietary
  • 14. Optimize your apps Minify static content • re-compress images to smaller sizes • serve smaller and gzipped JS/CSS files • concat. JS/CSS files to reduce number of fetches • include JS/CSS in gadget XML if possible Google Confidential and Proprietary
  • 15. Optimize your apps Be lean and mean lighter faster profile pages • use images, not swfs • use app data as cache • use owner/viewer only signed makeRequest • may choose to show owner-only data on profile pages • don't load unnecessary files Google Confidential and Proprietary
  • 16. Think ahead • Expect user requests and prefetch content • Preload content from your servers <ModulePrefs ...> ... <Preload href=”http://example.com/topScores”> </ModulePrefs> or <Preload href=”http://example.com/myScores” authz=signed views=”profile,canvas” signViewer=false> Google Confidential and Proprietary
  • 17. Best practices • Show a “loading gif” image when expecting the user to wait • Put Stylesheets at top • Put Scripts at bottom • Post-load components • Use Google's cached version of JS libraries Google Confidential and Proprietary
  • 18. Demo time Firefox extensions are your friends! • Firebug • Live HTTP Headers • YSlow Google Confidential and Proprietary
  • 19. Thank You! Optimize your app and save the day! Google Confidential and Proprietary 19