Long main-thread tasks
Silktide loads your pages in a real browser and records the longest tasks that occupy the browser while the page loads. This list shows which scripts kept the page busy, and for how long, with the longest first.
Why this matters
A browser does most of its work - running scripts, building the page, and responding to input - on a single . While one task runs, nothing else can happen: clicks, taps, and scrolling all freeze until it finishes. Tasks longer than 50 milliseconds are long enough for people to notice, which is why they are called long tasks. This list shows you exactly where that frozen time comes from.
How to fix it
This is an informational list rather than a pass/fail test. Use it to find your most expensive scripts, then for each one consider:
- Can it be removed, or replaced with something lighter? Third-party scripts are frequent offenders - see third-party code.
- Can it run later, after the page is interactive, or only when needed via ?
- Can the work be broken into smaller pieces, or moved off the main thread into a web worker?
How Silktide tests this
- Load the page in a real browser and record every main-thread task that takes longer than 50 milliseconds.
- Attribute each task to the script responsible where possible.
- List the tasks with their durations, longest first. Tasks over 100 milliseconds are highlighted as more serious.