Selected topic
Why CryptoViz uses workers
Web Workers keep expensive cipher operations away from the main UI thread.
Key points
- Visualizer playback, input fields, and navigation should remain responsive while heavy cryptographic operations run.
- The worker boundary separates UI state from algorithm execution.
- Structured worker messages make success, errors, and timing easier to inspect.
Code pattern
const worker = new Worker(new URL('../lib/workers/cipher.worker.ts', import.meta.url), { type: 'module' })