SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
Efficiently downloading
     and executing
       Javascript
       Pablo Moretti
       MercadoLibre
Agenda
● Script tag
● Script injection (async)
● Script injection with callback
● Download and execution in order




                 Let's go …
Example Page
      Javascript resources
        ● Jquery, Chico & 3 dummy
          resources

        ✕ Blocked DOM
        ✕ Load time
        ✔ Parallel requests *
        ✔ Share resources
Script tag
First approach,
join all javascripts.
   ✕ Blocked DOM
   ✕ Parallel requests *
   ✕ Load time
   ✕ Share resources
   ✔ Less requests




 * 90% of the browsers that navigate ML support 6 or more concurrent connections per domain.
Script tag
A better idea is to join
only the dummies js
and put the script in
the bottom.
   ✕ Blocked DOM
   ✔ Share resource
   ✔ Less requests
   ✔ Parallel requests
   ✔ Load time
Script injection (async)
This is the injection of
script from another script.
 ✕ Blocked onload
 ✕ Parallel requests
 ✕ Share resources
 ✔ No blocked DOM
 ✔ Load time
 ✔ Less requests
Script injection with callback
We could use a library and    ✔ No blocked onload
trigger it in onload event.   ✔ Share resources
                              ✔ Less requests
                              ✕ Parallel requests
                              ✕ Load time
Download and execution in order
We could use a better library     ✔ No blocked onload
                                  ✔ Parallel requests
and trigger it in onload event.   ✔ Load time
                                  ✔ Less requests
                                  ✔ Share resources
Defer & queue javascript inline
  Using a similar technique of GA track, we can defer the execution of
  javascipt inline.




The array is processed when we
want. For example, when
we download the dependency.
Questions ?

Contenu connexe

Tendances

Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Miguel Zuniga
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadKrivoy Rog IT Community
 
Zing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat ArchitectZing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat ArchitectChau Thanh
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPChau Thanh
 
Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmudjcp
 
CPAN Gems From The Far East
CPAN Gems From The Far EastCPAN Gems From The Far East
CPAN Gems From The Far Eastlestrrat
 
Paris Monitoring meetup #1 - Zabbix at BlaBlaCar
Paris Monitoring meetup #1 - Zabbix at BlaBlaCarParis Monitoring meetup #1 - Zabbix at BlaBlaCar
Paris Monitoring meetup #1 - Zabbix at BlaBlaCarJean Baptiste Favre
 
SPA2015: Hooman Beheshti – The Future of CDNs
SPA2015: Hooman Beheshti – The Future of CDNsSPA2015: Hooman Beheshti – The Future of CDNs
SPA2015: Hooman Beheshti – The Future of CDNsFastly
 
Azure DocumentDB en Global Azure Bootcamp 2017
Azure DocumentDB en Global Azure Bootcamp 2017Azure DocumentDB en Global Azure Bootcamp 2017
Azure DocumentDB en Global Azure Bootcamp 2017Matias Quaranta
 
Scaling Push Messaging for Millions of Devices @Netflix
Scaling Push Messaging for Millions of Devices @NetflixScaling Push Messaging for Millions of Devices @Netflix
Scaling Push Messaging for Millions of Devices @NetflixC4Media
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Storyvanphp
 
Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...
Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...
Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...Jean Baptiste Favre
 
Securing dns records from subdomain takeover
Securing dns records from subdomain takeoverSecuring dns records from subdomain takeover
Securing dns records from subdomain takeoverOWASP Delhi
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsCesar Cardenas Desales
 
Supporting large scale React applications
Supporting large scale React applicationsSupporting large scale React applications
Supporting large scale React applicationsMaurice De Beijer [MVP]
 
Building large scalable mission critical business applications on the web
Building large scalable mission critical business applications on the webBuilding large scalable mission critical business applications on the web
Building large scalable mission critical business applications on the webMaurice De Beijer [MVP]
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQPOSSCON
 
Safe and Fast Automation on AWS for Fun and Profit
Safe and Fast Automation on AWS for Fun and ProfitSafe and Fast Automation on AWS for Fun and Profit
Safe and Fast Automation on AWS for Fun and ProfitRaghavendra Prabhu
 
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer....NET Crowd
 

Tendances (20)

Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
Zing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat ArchitectZing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat Architect
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
 
Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmu
 
CPAN Gems From The Far East
CPAN Gems From The Far EastCPAN Gems From The Far East
CPAN Gems From The Far East
 
Paris Monitoring meetup #1 - Zabbix at BlaBlaCar
Paris Monitoring meetup #1 - Zabbix at BlaBlaCarParis Monitoring meetup #1 - Zabbix at BlaBlaCar
Paris Monitoring meetup #1 - Zabbix at BlaBlaCar
 
Nservicebus at scale
Nservicebus at scaleNservicebus at scale
Nservicebus at scale
 
SPA2015: Hooman Beheshti – The Future of CDNs
SPA2015: Hooman Beheshti – The Future of CDNsSPA2015: Hooman Beheshti – The Future of CDNs
SPA2015: Hooman Beheshti – The Future of CDNs
 
Azure DocumentDB en Global Azure Bootcamp 2017
Azure DocumentDB en Global Azure Bootcamp 2017Azure DocumentDB en Global Azure Bootcamp 2017
Azure DocumentDB en Global Azure Bootcamp 2017
 
Scaling Push Messaging for Millions of Devices @Netflix
Scaling Push Messaging for Millions of Devices @NetflixScaling Push Messaging for Millions of Devices @Netflix
Scaling Push Messaging for Millions of Devices @Netflix
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
 
Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...
Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...
Monitoring a billion kilometers of monthly ride sharing at BlaBlaCar - Zabbix...
 
Securing dns records from subdomain takeover
Securing dns records from subdomain takeoverSecuring dns records from subdomain takeover
Securing dns records from subdomain takeover
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applications
 
Supporting large scale React applications
Supporting large scale React applicationsSupporting large scale React applications
Supporting large scale React applications
 
Building large scalable mission critical business applications on the web
Building large scalable mission critical business applications on the webBuilding large scalable mission critical business applications on the web
Building large scalable mission critical business applications on the web
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Safe and Fast Automation on AWS for Fun and Profit
Safe and Fast Automation on AWS for Fun and ProfitSafe and Fast Automation on AWS for Fun and Profit
Safe and Fast Automation on AWS for Fun and Profit
 
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
 

Similaire à Efficiently downloading and executing Javascript

The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)Kyle Simpson
 
AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)Amazon Web Services
 
Django book15 caching
Django book15 cachingDjango book15 caching
Django book15 cachingShih-yi Wei
 
Queue Everything and Please Everyone
Queue Everything and Please EveryoneQueue Everything and Please Everyone
Queue Everything and Please EveryoneVaidik Kapoor
 
Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016Aaron Hnatiw
 
Real-Time Processing Using AWS Lambda
Real-Time Processing Using AWS LambdaReal-Time Processing Using AWS Lambda
Real-Time Processing Using AWS LambdaAmazon Web Services
 
Women Who Code, Ground Floor
Women Who Code, Ground FloorWomen Who Code, Ground Floor
Women Who Code, Ground FloorKatie Weiss
 
Real-time Data Processing using AWS Lambda
Real-time Data Processing using AWS LambdaReal-time Data Processing using AWS Lambda
Real-time Data Processing using AWS LambdaAmazon Web Services
 
Serverless - When to FaaS?
Serverless - When to FaaS?Serverless - When to FaaS?
Serverless - When to FaaS?Benny Bauer
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupMarakana Inc.
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibrePablo Moretti
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinJonathan Hochman
 
GWT HJUG Presentation
GWT HJUG PresentationGWT HJUG Presentation
GWT HJUG PresentationDerrick Bowen
 
Groovy & Grails - From Scratch to Production
Groovy & Grails - From Scratch to Production Groovy & Grails - From Scratch to Production
Groovy & Grails - From Scratch to Production Tal Maayani
 
Measuring Web Performance (HighEdWeb FL Edition)
Measuring Web Performance (HighEdWeb FL Edition)Measuring Web Performance (HighEdWeb FL Edition)
Measuring Web Performance (HighEdWeb FL Edition)Dave Olsen
 
Isomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and ReactIsomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and ReactTyler Peterson
 

Similaire à Efficiently downloading and executing Javascript (20)

The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)The Once And Future Script Loader (v3)
The Once And Future Script Loader (v3)
 
Javascript
JavascriptJavascript
Javascript
 
AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)
 
Django book15 caching
Django book15 cachingDjango book15 caching
Django book15 caching
 
Advanced Drupal 8 Caching
Advanced Drupal 8 CachingAdvanced Drupal 8 Caching
Advanced Drupal 8 Caching
 
A faster web
A faster webA faster web
A faster web
 
Queue Everything and Please Everyone
Queue Everything and Please EveryoneQueue Everything and Please Everyone
Queue Everything and Please Everyone
 
Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016
 
Real-Time Processing Using AWS Lambda
Real-Time Processing Using AWS LambdaReal-Time Processing Using AWS Lambda
Real-Time Processing Using AWS Lambda
 
Women Who Code, Ground Floor
Women Who Code, Ground FloorWomen Who Code, Ground Floor
Women Who Code, Ground Floor
 
wt mod3.pdf
wt mod3.pdfwt mod3.pdf
wt mod3.pdf
 
Real-time Data Processing using AWS Lambda
Real-time Data Processing using AWS LambdaReal-time Data Processing using AWS Lambda
Real-time Data Processing using AWS Lambda
 
Serverless - When to FaaS?
Serverless - When to FaaS?Serverless - When to FaaS?
Serverless - When to FaaS?
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User Group
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
 
GWT HJUG Presentation
GWT HJUG PresentationGWT HJUG Presentation
GWT HJUG Presentation
 
Groovy & Grails - From Scratch to Production
Groovy & Grails - From Scratch to Production Groovy & Grails - From Scratch to Production
Groovy & Grails - From Scratch to Production
 
Measuring Web Performance (HighEdWeb FL Edition)
Measuring Web Performance (HighEdWeb FL Edition)Measuring Web Performance (HighEdWeb FL Edition)
Measuring Web Performance (HighEdWeb FL Edition)
 
Isomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and ReactIsomorphic JavaScript with Node, WebPack, and React
Isomorphic JavaScript with Node, WebPack, and React
 

Plus de Pablo Moretti

Scaling with Microservice
Scaling with MicroserviceScaling with Microservice
Scaling with MicroservicePablo Moretti
 
Mobiledevcon - MercadoLibre web mobile
Mobiledevcon - MercadoLibre web mobileMobiledevcon - MercadoLibre web mobile
Mobiledevcon - MercadoLibre web mobilePablo Moretti
 
Breaking performance web rules
Breaking performance web rulesBreaking performance web rules
Breaking performance web rulesPablo Moretti
 
Demanda - MercadoLivre Developers Conference
Demanda - MercadoLivre Developers ConferenceDemanda - MercadoLivre Developers Conference
Demanda - MercadoLivre Developers ConferencePablo Moretti
 
Mercado Libre - Introducción a SEO
Mercado Libre - Introducción a SEOMercado Libre - Introducción a SEO
Mercado Libre - Introducción a SEOPablo Moretti
 

Plus de Pablo Moretti (6)

Scaling with Microservice
Scaling with MicroserviceScaling with Microservice
Scaling with Microservice
 
Mobiledevcon - MercadoLibre web mobile
Mobiledevcon - MercadoLibre web mobileMobiledevcon - MercadoLibre web mobile
Mobiledevcon - MercadoLibre web mobile
 
Breaking performance web rules
Breaking performance web rulesBreaking performance web rules
Breaking performance web rules
 
Demanda - MercadoLivre Developers Conference
Demanda - MercadoLivre Developers ConferenceDemanda - MercadoLivre Developers Conference
Demanda - MercadoLivre Developers Conference
 
Groovy & Java
Groovy & JavaGroovy & Java
Groovy & Java
 
Mercado Libre - Introducción a SEO
Mercado Libre - Introducción a SEOMercado Libre - Introducción a SEO
Mercado Libre - Introducción a SEO
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
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
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
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
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
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...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
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...
 
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...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
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...
 

Efficiently downloading and executing Javascript

  • 1. Efficiently downloading and executing Javascript Pablo Moretti MercadoLibre
  • 2. Agenda ● Script tag ● Script injection (async) ● Script injection with callback ● Download and execution in order Let's go …
  • 3. Example Page Javascript resources ● Jquery, Chico & 3 dummy resources ✕ Blocked DOM ✕ Load time ✔ Parallel requests * ✔ Share resources
  • 4. Script tag First approach, join all javascripts. ✕ Blocked DOM ✕ Parallel requests * ✕ Load time ✕ Share resources ✔ Less requests * 90% of the browsers that navigate ML support 6 or more concurrent connections per domain.
  • 5. Script tag A better idea is to join only the dummies js and put the script in the bottom. ✕ Blocked DOM ✔ Share resource ✔ Less requests ✔ Parallel requests ✔ Load time
  • 6. Script injection (async) This is the injection of script from another script. ✕ Blocked onload ✕ Parallel requests ✕ Share resources ✔ No blocked DOM ✔ Load time ✔ Less requests
  • 7. Script injection with callback We could use a library and ✔ No blocked onload trigger it in onload event. ✔ Share resources ✔ Less requests ✕ Parallel requests ✕ Load time
  • 8. Download and execution in order We could use a better library ✔ No blocked onload ✔ Parallel requests and trigger it in onload event. ✔ Load time ✔ Less requests ✔ Share resources
  • 9. Defer & queue javascript inline Using a similar technique of GA track, we can defer the execution of javascipt inline. The array is processed when we want. For example, when we download the dependency.