~/talk

O(1), O(n) and O(#$*&!)

Talkat RailsConf 2022 · 2022-05-17..05-19· [observability, devops-and-delivery]
links:none on file
slides:none on file

Flame graphs and Jaeger/Tempo traces expose actual bottlenecks: an M+1 DB pattern shows repeated queries, a factorial sort crashes the OpenTelemetry container past ~10 cats, selection sort takes ~4 ms for 30 cats while merge sort drops to ~1.2 ms, and parallelizing cat image fetches yields an ≈100× speedup. Rules emerge: closer is better, don’t wait around. OpenTelemetry plus an OpenTelemetry in-memory spans exporter lets automated tests assert span counts so regressions get caught before they ship.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04Big O complexity categories
  3. 2:30OpenTelemetry performance
  4. 3:56I/O slowness causes
  5. 5:21N+1 query problem
  6. 7:28Avoid waiting for I/O
  7. 8:54Parallelism in JS and Ruby
  8. 10:17Amdahl’s Law explained
  9. 12:05O(1) operations
  10. 12:47O(n) and collections
  11. 13:53Algorithmic complexity pitfalls
  12. 15:17O(n!) worst-case
  13. 17:01O(n²) sorting
  14. 19:33O(n log n) sorting
  15. 21:00Parallelizing reductions
  16. 23:50Enforcing performance tests
  17. 25:34When to stop optimizing
~/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.