~/talk

Multi-thread demystified

Talkat React Day New York 2021 · on Tuesday, 2021-10-05· [javascript, web-performance]
slides:none on file

JavaScript is already multi‑threaded but moving heavy work off the render thread matters: a React demo shows a single huge computation freezing the UI while the same work in a web worker keeps the interface responsive. Implementation details: worker file uses self.onmessage and postMessage, data moves via the structured clone algorithm (no shared instances), and Comlink creates a Comlink proxy so worker functions feel synchronous and stay strongly typed in TypeScript. Caveats: no DOM access, must handle worker errors, CSP headers and WebKit lack shared worker support.

AI-written summary · about

  1. 0:00Intro
  2. 1:28Hallo vom Berlin
  3. 3:32concurrent threads
  4. 4:58paralell threads
  5. 9:08UX Web-Workers
  6. 9:45Web-Workers types
  7. 10:44Scopes
  8. 11:52self
  9. 13:08data
  10. 15:24errors
  11. 16:24Thread safety
  12. 17:44CSP Header
  13. 22:05Promise
  14. 23:55worker.js
  15. 24:48trigger Worker task
  16. 27:57comlink.js
  17. 29:53what more?
  18. 31:40takeaway
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.