A slow click needs an explanation that leads to a testable change. Long Animation Frames can connect a delayed update to script entry points and rendering work, but their timings are not an INP score. Start with one reproducible interaction and use the extra detail to decide what to investigate next.
Choose one interaction before collecting more data
Pick an action whose result you can recognize: opening a filter panel, expanding a product option or applying a table sort. Write down the page template, application state, input method and expected visual response. A report that says only “the page is slow” leaves too many variables open. An investigation should let another developer repeat the same action without asking which menu or dataset you used.
Keep the initial observation small. Record whether the delay occurs on the first action, subsequent actions or both. Note whether the relevant feature has already loaded. These details form your test conditions, not evidence that a particular script is responsible. Use the guide to diagnosing INP delays when you need to separate input delay, event processing and the wait for the next paint.
INP describes responsiveness across a visit; a single laboratory click does not establish the site's field result. A good INP is 200 ms or less at the 75th percentile. This investigation aims to explain one contributor to that experience, while leaving the production measurement and its population intact.
Understand what the frame record actually represents
The Long Animation Frames API reports rendering updates delayed beyond 50 ms. A frame can contain several tasks, so a list of individual long tasks and a list of long frames answer different questions. The API provides timestamps and script attribution that help locate work around an update. It does not turn every recorded frame into an interaction, and its duration must not be relabelled as INP.
Check support in the browser you are testing. MDN marks the API as having limited availability, so absence of records is not a cross-browser statement about responsiveness. Feature detection should distinguish an unsupported observation from a supported observer that simply has nothing to report. Keep those outcomes separate in any diagnostic interface.
The official Long Animation Frames documentation explains the frame model and attribution boundaries. Keep it beside your investigation notes, particularly when a property is missing or an apparently slow frame has little script information. Missing detail is a reason to inspect another source of evidence, not to fill the gap with an assumption.
Capture a bounded local sample
Begin in a development or staging environment with a known build. Attach a PerformanceObserver for long-animation-frame, using its buffered option when appropriate, then perform the selected action. For an initial investigation, retain a small local sample and stop the observer after the test. Avoid adding a permanent site-wide collector before you know which fields will answer the question.
Create a worksheet with the action label, build identifier, browser version and test conditions next to the raw timing fields. Separate records captured before the action from those around the update. A long frame during page initialization may deserve its own investigation, but it should not silently become the explanation for a later click.
Repeat the action after returning the interface to its starting state. If a filter's first opening builds its contents and later openings reuse them, keep those journeys separate. Otherwise, an improvement caused by reuse can be mistaken for a code change. Save enough context to reproduce the result, while avoiding account details or actual user-entered text.
Read the fields without adding overlapping times
Use frame properties as clues with specific meanings. renderStart marks the start of the rendering cycle; styleAndLayoutStart marks the start of its style and layout calculations. blockingDuration is its own calculation, not another phase to add to the frame's duration. A zero renderStart also needs special handling rather than ordinary timestamp subtraction.
| Field or observation | Useful investigation question | Interpretation to avoid |
|---|---|---|
duration |
How long was this recorded frame? | This is the page's INP |
blockingDuration |
Was blocking work substantial in this frame? | Add this to duration |
renderStart |
When did the rendering cycle begin? | Everything before it was one script |
scripts |
Which script entry points were exposed? | This is a complete CPU profile |
| Missing source details | Which evidence is unavailable here? | An unnamed component did no work |
Do not build a pie chart by summing every number in a record. Some values describe intervals inside other intervals, while timestamps describe positions. Label the units and retain the original field names in the worksheet. If a calculation cannot be explained in one sentence, leave it out until its meaning is clear.
Treat a script entry point as a lead
A script record may identify a source URL, function name, character position and invoker. These can lead you to the code that entered the work, but they are not necessarily the deepest expensive function. An event listener can call a shared utility that performs the costly operation. Editing the listener's wrapper without following that call chain may change almost nothing.
For the chosen action, locate the reported entry point in the matching build and open a performance trace. Follow the relevant calls and compare their order with the visible update. Write a hypothesis such as “opening this panel rebuilds an unchanged list before showing it.” The next task is to confirm that sequence, not to remove the first named file from the bundle.
The script's forcedStyleAndLayoutDuration can point toward synchronous style or layout work during its execution. Inspect the surrounding DOM reads and writes before deciding what to move. A large value does not tell you which visual change is dispensable. Preserve the required result, including focus, expanded state and keyboard behavior, while investigating a smaller amount of work.
Keep attribution gaps visible
Script attribution does not cover everything affecting a frame. Chrome's documentation describes coverage for main-thread scripts, including same-origin frames, with gaps for cross-origin frames, workers and isolated extension code. It also limits script attribution to executions over 5 ms. A sparse list therefore cannot prove that the rest of the page was idle.
Maintain an explicit “unattributed or not observed” category in the investigation. Do not distribute the remaining time proportionally across named scripts merely to make a chart add up. When the local trace and the API record disagree, preserve both observations and investigate their boundaries. One is not automatically wrong because it contains a different level of detail.
Keep support information alongside any aggregated sample. If diagnostic records come from only some browsers, describe them as that supported sample. Continue to monitor the normal responsiveness metric separately. A tool that has fewer diagnostic records after a deployment may have lost coverage, changed sampling or stopped loading; that alone is not a performance improvement.
Test one change against the same journey
Suppose a local investigation suggests that opening a panel sorts data that has not changed. This is an illustrative hypothesis, not a measurement from a real site. Test a narrowly scoped change that reuses the valid result, with an explicit invalidation path when the input changes. Keep unrelated styling, network settings and dependencies stable so the comparison stays understandable.
Run the original and changed versions through the same first-open and repeat-open journeys. Check the expected content as carefully as the timings. Then change the input and confirm that the panel does not display stale results. A fast update with incorrect data is a failed experiment, even if the long frame disappears.
Record several comparable observations rather than selecting the best run. Include the device conditions and any throttling settings. If the suspected segment shrinks but the next visual response remains delayed, return to the full timeline. Work may have moved elsewhere, or the first hypothesis may explain only one part of the delay.
Extend collection only when the question warrants it
If a local fix looks sound, decide whether field attribution is necessary to check its reach. Define a small diagnostic payload before deployment: a controlled action label, build identifier and the limited timings needed for the hypothesis. Review whether script URLs or function labels could reveal sensitive information. Remove unnecessary query strings and avoid collecting DOM text, form values or arbitrary element content.
Set sampling and retention deliberately, then check the overhead of the collector itself. Keep the diagnostic release identifiable so it can be removed or narrowed after the investigation. An instrumentation change should not introduce enough extra work to become part of the interaction problem it is supposed to explain.
Close the investigation with a short reproducible record: the affected journey, supported browser sample, suspected entry point, confirmed cause, tested change and remaining uncertainty. Judge the rollout with the actual INP measurement and normal functional checks. The useful outcome is a verified explanation and a reliable improvement, not simply an empty list of long frames.