Minimize main-thread work
Overview
‘Minimizing main-thread work’ is a high impact audit within the context of your site performance.
The main-thread handles most of the processes involved in loading your page. How fast your page loads depends on how much work the main-thread needs to do.
It is important to ensure that the main-thread is not kept busy for too long so that your page renders fast and remains responsive.
How to minimize main-thread work?
Minimizing main-thread work should be one of the foremost goals in your development workflow.
Main-thread work can largely be minimized by:
- reducing the time spent evaluating scripts.
- minimizing style and layout recalculations.
- reducing the time spent parsing CSS/HTML/JavaScript.
- preventing the delay in rendering page pixels.
Minimize main-thread work with Staq
To optimize, go to Site Optimizer > JavaScript. Then turn on: Delay JavaScript execution.
Go to Site Optimizer > Extra Options, and enable Optimize HTML in order to reduce your DOM size and minimize main-thread work:
You might be interested in these