~/talk

Your Browser is Pooped: Using Web Workers To Create A Browser-Based Barcode Scanner

Talkat Philly ETE 2023 · 2023-04-11..04-12· [javascript, web-performance]
links:none on file
slides:none on file

Demonstrates a 100% browser barcode scanner built with React/Vite/TypeScript that moves per-frame image work off the UI thread into web workers, using Navigator.mediaDevices → getUserMedia, drawing video frames to a canvas → imageData and posting that to worker threads. Uses a JS barcode library polyfill and transferable objects (canvas/image buffers). Demo shows CPU dropping from ~25% to ~9–13% after offload, works offline, with caveats around experimental APIs and Safari compatibility.

AI-written summary · about

  1. 0:00Start
  2. 3:01Today's word of the day
  3. 4:22Browser breakdown
  4. 5:30The Render Process-composition
  5. 7:29How do we perceive main thread pauses?
  6. 11:02Creating a web based barcode scanner
  7. 11:25Real-world reasons for a web based scanner
  8. 16:19Library Polyfill
  9. 16:43Pseudocode
  10. 17:16Diagram - Load up the main thread
  11. 18:13Demo time
~/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.