Diagnosing a slow interaction in a Next.js app
Measure what happens between a click and visible feedback to locate the work that makes an app feel slow.
Capture one trace
Use representative data and a phone or throttled browser. Mark when the click happens, when the server responds, and when the interface shows a meaningful change. Check whether expensive JavaScript runs before a loading state can paint.
Change one thing
Reduce synchronous work or split the request only where the trace points. Compare before and after under the same conditions, and verify the task still completes when the request fails.