All jobs / Frontend / web developer / Performance
Frontend / web developer interview question · 3–5 years
Clicking Filter freezes the tab for about 400ms. How do you investigate?
The strongest answer
Use the Performance panel and React Profiler to find the long task — hydration, sync layout, or a heavy filter — then split, defer, or move work off the main thread
Why it works
Mid-level performance is a method: record, attribute, then change the work, not the chrome.
What a good answer covers
- Record the click.
- Find the long task in Performance / Profiler.
- Cut sync work: virtualize, defer, worker.
- Re-measure the same interaction.
Answers that fall short
- Close, but not the strongest: Add a spinner and leave the main thread blocked
A spinner during a 400ms sync freeze still janks. - Weak: Leave console.time in production as the only signal
console.time is a start, not a profile. - Red flag: Drop alert() calls through the handler to feel the slowness
alert yields and lies about timing.
Who gets asked this
More Performance questions
- Product asks if the new home is faster. What do you report?
- How do you ingest Web Vitals without drowning the backend or leaking PII?
- How do you keep marketing JS from growing without anyone noticing?
- Ten thousand rows in a div and the tab dies. What do you do?
- A feature flag flips the hero after hydrate (flicker). How do you prevent it?
- An SSR page waits for user, then cart, then recommendations, sequentially. What's the issue and the fix?
- A content site with a few interactive widgets — full CSR SPA or islands / edge?
- Personalized HTML at the edge versus cache hit ratio — how do you decide?