Minimize main thread work
The browser’s main thread processes all the scripts and styles needed to display the web page. When it has too much work to do, the thread is blocked and this delays the page load and will make it unresponsive.
This PageSpeed Insights Diagnostic will flag pages that keep the main thread busy for longer than 4 seconds during load and show a breakdown of where CPU time was spent while the browser loaded your page:
How to minimize main thread work with WP Rocket?
In this Diagnostic, PageSpeed Insights has sections based on the categories that Lighthouse reports. Let’s see which WP Rocket’s features can help in each section:
- Minify/Combine CSS & Minify/Combine JS
- Google Tracking Add-On & Facebook Pixel Add-On
Style and layout & Rendering
WP Rocket can’t help here as it’s related to the DOM and to the layout structure. More details in these articles:
- Reduce the scope and complexity of style calculations
- Avoid large, complex layouts and layout thrashing
Parsing HTML and CSS
Script parsing and compilation
WP Rocket can’t help here as this is the time Chrome Browser spend to collect the memory usage : https://web.dev/monitor-total-page-memory-usage/
You’ll find more details on these sections here: https://web.dev/mainthread-work-breakdown/