Main-thread work
The main thread is where the browser does most of the work for a page: reading the HTML, applying the styles, working out the layout, drawing the screen, running scripts and cleaning up memory it no longer needs. It can do only one of these at a time. Main-thread work shows how much time the browser spent on each during Google’s lab test.
Why it matters
Section titled “Why it matters”As long as the main thread is busy, the page can’t react. A tap on the menu waits, and new content isn’t drawn. The total shows how much work the page asks of the browser; the breakdown shows what kind of work it is, which points to the cause.
The categories in the breakdown:
- Script evaluation: running JavaScript, often the largest part.
- Style and layout: applying the stylesheets and working out where everything goes.
- Rendering: drawing the page on the screen.
- Parsing HTML and CSS: reading the page and its stylesheets.
- Script parsing and compilation: preparing JavaScript to run.
- Garbage collection: freeing memory the page no longer uses.
The total isn’t the same as Total Blocking Time. Main-thread work counts all the work; Total Blocking Time counts only the part of long tasks that keeps the page from reacting.
What influences it
Section titled “What influences it”WordPress: The most common cause of heavy main-thread work on WordPress sites is JavaScript from themes, page builders and plugins, which shows up as script evaluation. Page builders also tend to wrap content in many layers of HTML, and a page with thousands of elements makes style, layout and rendering work grow.
Browser: Scripts from other services, such as analytics, ads, chat widgets and embedded videos, add their own script work. Large, complex stylesheets and animations that change the layout repeatedly add to style and layout. The simulated phone has a slower processor, so all of this takes longer in the mobile test.
In Permo
Section titled “In Permo”Permo shows main-thread work in two places on its PageSpeed page. The Main thread card lists each category as a row and as a segment of a ring. Above the waterfall, a strip shows when the main thread was busy during the load; tall blocks are tasks longer than 50 milliseconds, the ones that make the page slow to react.
Reference values
Section titled “Reference values”Lighthouse flags pages that keep the main thread busy for longer than 4 seconds during the load (source: Chrome for Developers, Minimize main thread work, accessed October 16, 2026).
Related
Section titled “Related”- JavaScript execution time
- Total Blocking Time (TBT)
- Interaction to Next Paint (INP)
- PageSpeed Insights and Lighthouse
Sources
- Minimize main thread work, accessed
- Total Blocking Time (TBT), accessed