Next.jsQuestion 12 of 15
The page is slow — how do you diagnose and speed it up?
Answer out loud or in your head first, then compare.
Answer
First I reproduce the problem on a production build and pin down: is content slow to appear, is a request taking long, or is interaction janky?
Plan:
- Check Network: response times, the request waterfall and resource sizes.
- Look at Lighthouse and LCP, CLS and INP; profile interactions.
- Check the LCP image, image sizes, fonts and third-party scripts.
- Cut unnecessary JS and defer heavy, optional components.
- Verify data fetching, caching and server work.
- Compare measurements after the change under the same conditions.
Pitfall: adding useMemo everywhere won't fix a slow API or a multi-megabyte image.
How did it go? Be honest — “Not yet” puts the question on your review list.