SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Similar a 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
 

Similar a 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
 

Último

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Último (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

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