~/talk

"How I made critical code run much faster"

Talkat Tokyo Node Festival 2018 · 2018-11-23..11-24· [software-architecture]
slides:none on file

A Node.js SQL-injection detector that runs on every query starts at about 5 ms per execution and becomes a scalability problem as HTTP traffic grows above 10% of requests. Performance improvements include moving closures out of the hot function to avoid repeated redefinition (≈5x win) and replacing repeated string slices with a character-by-character scanSTR no-alloc matcher, dropping per-call time to under 1 ms. Investigation uses Chrome DevTools CPU and heap profilers and uncovers V8 deopt/hidden-class pitfalls that require careful typing to avoid losing optimization.

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:31Initial slow SQL injection code
  3. 3:19Fixing closure instantiation issue
  4. 4:22Identifying slowest function part
  5. 5:04Understanding the parser function
  6. 8:58Optimizing token checks order
  7. 10:24Fixing inefficient string slicing
  8. 12:53V8 optimization limitations
  9. 15:44Type optimization and deoptimization
  10. 17:34Shadow classes impact on optimization
  11. 20:02Key lessons and advice
  12. 21:49Start with easy optimizations
  13. 23:14Context and big picture importance
~/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.