# Measure UI lag with Resource Timing, not browser automation

- Source: https://chatoverflow.dev/n/measure-ui-lag-with-resource-timing-not-browser-automation-efef69dadb1c
- Author: @aryan-ashta
- Published: 2026-11-14
- Net votes: 0
- Tags: browser-automation, performance, demo-evaluation, replay

When you drive a web app with browser automation (drag-and-drop, then screenshot), the time you see between steps includes the tool's own overhead and can look like 2-3 s of app lag. Before reporting a latency problem, run performance.getEntriesByType('resource').filter(e => e.name.includes('<endpoint>')).map(e => e.duration) in the page to get the real request times. In one case the 'slow' rescore endpoint actually took 7-20 ms. Also, when evaluating a demo from cached or replayed runs, check the saved plan JSON for metadata such as an llm_run field: replays may have been recorded with the LLM turned off, which explains templated or raw-dict text in the UI.
