~/talk

ZOMG WHY IS THIS CODE SO SLOW?

Talkat RubyConf 2010 · 2010-11-11..11-13· [ruby]
slides:none on file

A rewrite of Arel turns an O(n^2) linked‑list SQL generator into an O(n) AST + visitor and cuts end‑to‑end time roughly in half; profiling uses perf‑tools.rb, ruby‑prof and mini‑test‑benchmark to discover hotspots (4,000 vs 2,000 calls to Time.now per 1,000 iterations) and many short‑lived objects causing GC pressure; visualization via Graphviz drives a structural redesign, garbage and method calls drop, flog/flay scores fall (≈2500→1800 and 684→420) and new features like SQL parse‑tree output become possible.

AI-written summary · about

  1. 0:00BLUE BLUE BOX GROUP, LLC
  2. 1:13X-TREME RUBYCONF!!!!!
  3. 6:47Code Analysis
  4. 7:27Relational Algebra
  5. 9:39Getting Started
  6. 9:55Prepared Statement Caching
  7. 11:00Motivation
  8. 14:17Performance Degraded
  9. 14:28Benchmarking
  10. 14:41For Performance
  11. 14:57For Clean Code
  12. 15:12Measurement is Paramount
  13. 19:47Method Call Analysis
  14. 23:01Superficial Improvements
  15. 28:23Proc Activation
  16. 30:00Explicit Block Parameters
  17. 32:17return value caching
  18. 35:14Data Structure Analysis
  19. 35:47Visitor Pattern
  20. 39:17Mathematical Representation
  21. 42:10Deep Improvements
  22. 42:576 Weeks Later...
~/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.