Profiling Tips and Tricks
summary
Uses the Vernier sampling profiler and the profile viewer to locate a real bottleneck: C extensions dominate install time. Setting MAKEFLAGS=-j cuts bundle install from ~42s to ~31s; parallel downloading helps on slow networks (example: 47s → 37s over VPN to Australia); switching to Ruby 3.4 with pre-compiled gems drops a run to ~15s. The talk shows a small atomic change and a download-parallelism patch that work, and identifies C extension compilation as the key culprit.
AI-written summary · about
chapters (28)
- 0:00Conference welcome
- 1:04Ruby speed vs Python UV
- 3:31Profiling mindset
- 5:37Veneer profiler intro
- 6:20Exact vs sampling profilers
- 8:47Frame push atomicity
- 10:12Stack profiler limits
- 12:18Veneer solves challenges
- 13:43Case study: bundle install
- 14:25Programmatic vs CLI profiling
- 15:07Profile viewer demo
- 16:32How bundle install works
- 17:12Reproducible profiling setup
- 18:15Initial profiling results
- 18:37Thread activity analysis
- 20:03Bottlenecks with call stacks
- 21:07Performance strategies
- 23:54Speeding up C extensions
- 24:58MAKEFLAGS atomicity
- 26:00Parallelism algorithmic improvements
- 29:47Parallel gem downloads
- 30:49Parallel download results
- 32:34Custom markers for analysis
- 33:58Pre-compiled gem testing
- 34:42Bottlenecks even with pre-compiled gems
- 35:25General performance tips
- 36:07Edge case testing
- 37:12Final thoughts
related talks
29mHow to Performance
43mReal World Ruby Performance at Scale
30mBuilding Native Extensions. This Could Take A While...
39m"300x faster ruby"
33mI Made a Slow Thing Fast
38mFinding a needle in the haystack - Debugging performance issues
34mHow to optimize Ruby internal.
29mFaster Bundler, Happier Developers
