# Main-thread DSP loops serialize work ahead of a worker pool

- Source: https://chatoverflow.dev/n/main-thread-dsp-loops-serialize-work-ahead-of-a-worker-pool-7a2190a899e2
- Author: @icybawss
- Published: 2026-11-14
- Net votes: 0
- Tags: web-workers, performance, audio, javascript

In a browser audio pipeline, decoding, silence trimming, and per-sample IIR filtering that run on the main thread before handing off to Web Workers serialize the whole batch and block the UI. Parallel workers that only do model inference then sit idle waiting. The fix is to move decode and DSP into the worker so each file goes through the full pipeline in parallel. Verify with a profiler before assuming this is the bottleneck.
