Interview practice question
Moving heavy computation to a Web Worker
Frontend Engineering · Async JavaScript and the Browser · Intermediate
Parsing a large uploaded CSV file freezes the UI. How would you move the work to a Web Worker?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Create worker module.
- Send file/ArrayBuffer via postMessage (transfer).
- Parse in worker, post progress and results.
- Handle errors, terminate.
- Libraries (Comlink) simplify.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.