Interaction to Next Paint (INP) is the Core Web Vital that measures how quickly a page responds when someone clicks, taps, or types. Partytown is one way to move eligible third-party scripts off the main thread. The two connect only through the main thread: Partytown can reduce competition for main-thread time, but it does not guarantee a better INP, fix a slow first-party handler, or make every third-party integration safe. Diagnose the slow interaction first, then decide whether worker offloading is a candidate.
What INP measures
INP observes click, tap, and keyboard interactions across an entire page visit, not only the first one. For most visits it reports the worst interaction. On pages with many interactions, the browser ignores one highest interaction for every 50 interactions, so a single isolated hiccup does not define the score. The reported value is the 75th percentile of page views, and mobile and desktop are assessed separately.
As an Amazon Associate I earn from qualifying purchases.
The current thresholds in web.dev’s INP guidance (accessed 2026) are:
Recommended Free Tools
| Rating | INP at the 75th percentile |
|---|---|
| Good | 200 ms or less |
| Needs improvement | Above 200 ms through 500 ms |
| Poor | Above 500 ms |
web.dev puts it directly: “An INP below or at 200 milliseconds means a page has good responsiveness.”
#1 Best Overall
- Used Book in Good Condition
Each interaction’s latency has three parts:
- Input delay: the time before event callbacks begin, often because the main thread is busy with other work.
- Processing duration: the time spent running the callbacks for that interaction.
- Presentation delay: the time between callback completion and the next frame being painted.
Slow handlers and rendering work can account for as much latency as a busy main thread. Asynchronous work that starts afterward, such as a network request, is not what INP is designed to capture; the measurement ends at the next paint, the earliest point where the user sees feedback.
Responsiveness also matters beyond the initial load. The INP guidance cites Chrome usage data (year not stated on that page) showing that users spend 90% of their time on a page after it loads, which is why INP covers the whole visit.
Diagnose the slow interaction before choosing a fix
Most INP problems look the same from the outside: the button feels late. The fix depends on which of the three latency parts is large, so start with a trace.
Rank #2
- Reproduce the slow interaction on a production-like build. Use a mid-range device profile or CPU throttling in browser developer tools, because a fast development machine can hide the problem.
- Record a trace in the Performance panel of Chrome DevTools and locate the interaction’s marker.
- Read the three phases: how long the input waited, how long the handler ran, and how long it took to present the next frame.
- Inspect the long tasks and script attribution in the same time window to identify the code responsible.
- Check field data for the same page and device class to confirm the problem affects real users, not only your local test.
Long tasks from third-party scripts
This is the case Partytown targets. The trace shows a vendor script running during the input delay window or inside the handler’s processing time. Attribution is the key evidence: if the work comes from a tag or SDK rather than your bundle, a third-party script is a plausible cause. Do not conclude this from timing alone.
Slow first-party handlers
If processing duration dominates and the callback is your own code, moving analytics elsewhere will not help. Profile the handler, reduce the synchronous work it performs, or defer non-essential updates until after the visible feedback.
Rendering and layout work
When presentation delay is the large component, the cost is usually style recalculation, layout, or paint triggered by the interaction. Large DOM updates, forced layouts, and expensive paint areas show up here. Worker offloading does not change any of that.
Rank #3
Work in another frame
INP can include interactions inside iframes. Identify which frame owns the interaction before you attribute it to the page’s own scripts. A slow embedded widget may be the real source of the delay.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallWhere Partytown fits
Partytown is a lazy-loaded library for running resource-intensive third-party scripts in a web worker, freeing the main thread for the site’s own application code. The project README describes it this way: “Partytown is a lazy-loaded library to help relocate resource intensive scripts into a web worker, and off of the main thread.”
Partytown’s documentation says scripts that are not needed in the critical rendering path are the best candidates. It lists Google Tag Manager, Google Analytics, Facebook Pixel, Mixpanel, HubSpot, Segment, and Amplitude as examples. The project does not hardcode support for each service and asks users to validate every integration. It also describes itself as beta and not guaranteed to work in every scenario.
Good candidates
- The trace shows the vendor script occupying the main thread during the slow interaction.
- The script is not needed to render the initial view or to respond to immediate user input.
- The script’s work can run asynchronously without changing what the user sees or does.
- You can test the exact vendor integration against your real user flows.
Poor candidates
- Slow first-party handlers, where the trace points at your own code.
- Scripts required in the critical rendering path or for immediate interface behavior.
- Scripts that depend on main-thread APIs or synchronous DOM access you have not verified in a worker.
- Consent tooling that must read or change state immediately, until you have confirmed it behaves correctly.
Configuration controls
Partytown provides a setting for forwarding selected main-thread calls to the worker, and a loadScriptsOnMainThread filter for scripts that must stay on the main thread. Its default library path is hosted on the same origin as your site. Setup differs between frameworks, so follow the current Partytown integration guide for your stack rather than copying a configuration from an older example.
Remove, defer, or relocate
Partytown is one of three levers. They change different things, so pick based on what the trace shows and whether the script is needed at all.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →| Option | What changes | Best when | Main risk | How to verify |
|---|---|---|---|---|
| Remove | The work no longer happens | The tag has no current use or duplicates another | Losing data or behavior you still depend on | Confirm no reports or features depend on it; the trace no longer shows the work |
| Defer | Timing changes; the work still runs on the main thread | The script is not needed early but must run on the main thread | The deferred work still lands during an interaction | The trace shows no overlap between the script and the interaction window |
| Relocate to a web worker (Partytown) | Execution moves off the main thread | An eligible third-party script occupies the main thread and must keep running | Compatibility failures, sometimes silent | Event delivery and functionality match the main-thread version; field INP improves |
Relocation changes where work runs; deferral changes when it runs. Relocation is only worth the added complexity when the script’s work is what competes with the interaction.
Best Value
Validating a Partytown integration
- Inventory every third-party script and tag. Mark each as a worker candidate or a main-thread-only script.
- Add the Partytown integration for your framework in a non-production environment. Keep the scripts you flagged as main-thread-only on the main thread with the
loadScriptsOnMainThreadfilter. - Check functional parity with the main-thread version. Confirm that pageviews and custom events arrive with the same payloads in the vendor’s debugging or preview tools, and that the browser console shows no new errors.
- Test consent behavior: the banner, the accept and reject paths, and whether tags fire only after consent in the same way as before.
- Exercise critical flows, such as forms, checkout, and navigation, using click, tap, and keyboard input on the same pages.
- Record repeatable traces before and after the change, and compare field INP segmented by mobile and desktop over a period long enough to smooth out traffic differences.
- Keep a rollback path that restores main-thread loading for the script without a full redeploy of the application.
Failures that do not announce themselves
- Events that are sent, but with missing or altered data, so the dashboards look normal while the numbers drift.
- Scripts that assume main-thread APIs and fail only in specific user flows.
- Consent behavior that differs from the main-thread version, which is the costliest failure to discover late.
Reading the results honestly
Chrome’s Next.js third-party libraries article reports a 92% reduction in Total Blocking Time (TBT) after a Google Tag Manager container was moved into a worker in a Next.js site. The article does not state its publication year on the page reviewed, and it describes this as one example. It is not a universal effect and it is not an INP result. The same article warns that scripts can silently break after relocation.
TBT is a useful lab proxy that approximates INP, but it is not the outcome you are trying to improve. Report a TBT change as a lab observation. Report an INP change only when field data confirms it.
Chrome’s third-party resources article cites ecosystem figures from third-party research. Before quoting any of them, check the original report’s year, sample, and method, because the figures are attributed to that research rather than to Chrome.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Sources
- web.dev, “Interaction to Next Paint (INP)”: definition, interaction model, thresholds, and lifecycle context.
- QwikDev Partytown repository: project description and beta status.
- Partytown Introduction and Configuration documentation: intended script categories and configuration controls.
- Chrome for Developers, third-party resources article: third-party performance mechanisms and sequencing considerations.
- Chrome for Developers, Next.js third-party libraries article: framework example, worker comparison, the TBT figure above, and a compatibility caveat.
- web.dev INP codelab: practical interaction diagnosis examples.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




