Interview practice question
The page freezes during a heavy calculation
Frontend Engineering · Async JavaScript and the Browser · Beginner
When users click "Generate report," the page freezes for several seconds. Why, and how do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Long synchronous work blocks main thread.
- No rendering or input meanwhile.
- Move to Web Worker.
- Chunk work, yield to event loop.
- Optimise algorithm or do server-side.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.