Interview practice question
Web Worker communication becomes a bottleneck
Frontend Engineering · Async JavaScript and the Browser · Experienced
You moved work to a Web Worker, but performance barely improved because of message passing overhead. How do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Large structured clones are expensive.
- Transfer ArrayBuffers instead of copying.
- Send less data, batch messages.
- Keep data in worker; send results only.
- SharedArrayBuffer if isolated.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.