~/talk

Off the Main Thread: How Web Workers Transform Web Performance

Talkat GDG DevFest Ahmedabad 2024 · on Sunday, 2024-11-24· [javascript, web-platform]
links:none on file
slides:none on file

Demonstrates moving pixel-heavy image filters off the main thread using Web Workers with OffscreenCanvas and ImageBitmap, sending data via transferable objects and postMessage, then terminating the worker. The original canvas run takes about 11.8 seconds on the main thread; the worker flow finishes in ~2.29 seconds while the UI stays responsive (main-thread response around 115 ms). Notes limitations: no DOM or localStorage access, bundler-relative worker paths, useful for image processing, game physics, large client-side aggregations and sandboxing third‑party scripts.

AI-written summary · about

  1. 0:00Introduction and warmup
  2. 1:28Speaker introduction
  3. 3:36Website responsiveness problem
  4. 5:01JavaScript single-threaded nature
  5. 7:50Demo of main thread blocking
  6. 11:46Solution: Web Workers
  7. 15:20Web Workers caveats
  8. 17:28Code walkthrough setup
  9. 21:48Creating a Web Worker
  10. 23:12Worker file and offscreen canvas
  11. 26:51Receiving worker results
  12. 28:38Performance comparison demo
  13. 32:14Where to use Web Workers
  14. 34:41Closing remarks and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.