Global Scope 2022

Improve your Lighthouse score with Partytown

About this presentation

Today, even a static site is full of JavaScript to add menus, interactivity, and third-party analytics scripts such as Google Tag Manager, which can drastically lower your Lighthouse score. Partytown provides a way to improve performance scores by running third-party scripts from a web worker. A JavaScript based site consists of two sources of slow down, the site itself and third-party scripts. Partytown is going to solve the the latter, by removing third party scripts from the main thread of your website. The philosophy is that the main thread should be dedicated to your code, and any scripts that are not required to be in the critical path should be moved to a web worker. Main thread performance is, without question, more important than web worker thread performance.