Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Sequel and Roda have dominated TechEmpower's independent benchmarks for Ruby web frameworks for years. This presentation will discuss optimizations that Sequel and Roda use, and how to use similar approaches to improve the performance of your own code. RubyKaigi 2019 https://rubykaigi.org/2019/presentations/jeremyevans0.html#apr20
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the keynote presentation titled 'Optimization Techniques Used by the Benchmark Winners,' Jeremy Evans discusses the performance optimization methods applied in the Ruby web frameworks Sequel and Roda, which have consistently excelled in TechEmpower's benchmarks. Key points covered in the presentation include: - **Background**: Sequel is a toolkit for database access, while Roda is for web applications, both maintained by Evans since their initial creation. They have outperformed other Ruby frameworks primarily by executing less code in performance-sensitive areas. - **Optimization Principles**: The fastest code often involves reducing processing; for example, avoiding unnecessary initialization of instance variables can boost performance by about 150%. - **Comparison with Active Record**: Evans contrasts Sequel's approach to object creation with Active Record, highlighting that Sequel delays certain initializations until absolutely necessary, thus avoiding overhead. - **Efficient Method Definitions**: He emphasizes using faster constructs to define methods (such as using ‘def’ instead of ‘define_method’) and caching strategies to minimize repeated computation during SQL generation, significantly enhancing performance. - **Plugins for Flexibility**: Both libraries utilize a plugins system that allows additional features without impacting the baseline performance of existing classes, enabling users to load features as needed. - **Memory and Object Allocation**: Sequel and Roda aim to reduce object allocations (like strings and hashes) by utilizing frozen constants and maintaining a low allocation profile overall. - **Performance Testing**: Evans advises that any optimization should be thoroughly vetted through testing and profiling to ensure effectiveness while maintaining code readability and user experience. In conclusion, Evans encourages developers to think critically about optimization, take a community-driven approach to improve Ruby's performance as a whole, and emphasizes that thoughtful implementation of these techniques can lead to significant performance improvements without sacrificing code quality.
Suggest modifications
Cancel