Impact of 3rd Party JavaScript

tl;dr - the top 100 3rd party scripts account for more than half of all JavaScript execution time

There have been some great explorations into this topic before but mostly centered around number of requests, total bytes, etc and correlating to performance, so I poked around for some direct answers about execution time. I’m excited about this start and the possibility to dive deeper into individual scripts, libraries, etc in the future!

Detailed queries and reports with third-party rankings are over in https://github.com/patrickhulce/third-party-web, but here are some highlights:

  • Third-parties account for ~65% of all JavaScript execution.
  • Top 100 third-parties account for ~59% of all JavaScript execution.
  • Ads are the biggest chunk of third-party execution at ~23%.
  • Just Google Ads and Google Tag Manager account for ~22% of all JavaScript execution.

Breakdown of 3rd Party Execution by Category
breakdown by-category

Feedback and contributions welcome! I’ve only identified ~90% of the third-party script execution origins so far, so help wanted on the long tail :slight_smile:

5 Likes

Patrick,

Awesome research!!!

Just scanning through the document, did you use the desktop or mobile archive? The reason I ask is a lot of the speeds seem a bit faster than I see when I test against mobile devices.

Thanks Chris!

The latest data was taken from mobile (httparchive:lighthouse.2019_01_01_mobile). The numbers do intuitively feel a bit lower than what I might expect, but this is mostly capturing all initial script executions.

Async tasks scheduled with setTimeout/fetch callbacks tend to lose their attribution entirely right now. There’s work in progress in Lighthouse that should help close this gap soon.

3 Likes

Awesome datasets and analysis, Patrick. All highly significant. Thank you for doing this.

2 Likes

This is a really good analysis and great work!

1 Like