~/talk

"The View Is Clear from Here"

Talkat RubyConfBY 2019 · on Saturday, 2019-04-06· [ruby-on-rails, web-performance]
slides:none on file

Walks through how Rails Action View compiles ERB into Ruby methods (ERB backends: erubi is fastest), shows microbenchmarks: naive compile+eval ~27k renders/s, caching compiled source ~63k/s, turning templates into dynamically defined methods ~1.4M renders/s (≈52× faster). Demonstrates surprising results: fragment caching can be ~5× slower because cache key computation outweighs render cost. Recommends ERB -> methods strategy, avoid instance variables in templates, keep locals consistent and notes a Github precompile effort and a cache can be slower caveat.

AI-written summary · about

  1. 0:00Introduction
  2. 1:11About the speaker
  3. 3:58Ruby and logic
  4. 7:10Rails view layer
  5. 9:35ERB templates
  6. 12:01Capturing blocks
  7. 14:12Optimizing view performance
  8. 18:23Instance variables vs locals
  9. 22:44Pre-compilation issues
  10. 25:51Ambiguous rendering behavior
  11. 30:54Predictable performance
  12. 33:33Caching and benchmarking
  13. 36:47Proposed optimizations
  14. 39:30Conclusion and Q&A
~/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.