Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
This talk explores how to use a Ruby profiler, how one works, and new techniques Vernier uses to give more information more accurately with lower overhead Tropical.rb - The Latin America Rails Conference https://www.tropicalrb.com/
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 this talk titled "Vernier: A Next Generation Ruby Profiler," John Hawthorn, a Rails Core member and Ruby committer, introduces Vernier, a new profiler specifically designed for Ruby 3.2 and greater. The talk emphasizes the necessity of profiling to uncover hidden performance issues in Ruby applications, particularly in contexts as complex as GitHub.com, where Hawthorn is a staff engineer. Key points discussed include: - **Purpose of a Profiler**: Profilers help identify performance bottlenecks in libraries, database queries, or network requests, revealing insights on how and where programs spend their time. - **Vernier Overview**: Developed to provide greater accuracy and lower overhead compared to previous Ruby profilers, Vernier features an intuitive frontend inspired by the Firefox profiler. The presentation includes a demo measuring the performance of the 'bundle lock' command. - **Profiling Demonstration**: During the demo, Hawthorn shows how Vernier records execution time and allows visualizations that display where time is spent in the program. It features both a timeline view and a call tree view, helping developers pinpoint inefficiencies effectively. - **Analyzing Performance**: Hawthorn illustrates how to identify problematic method calls using the call tree. For instance, 'String#split' emerged as a high-time consumer due to excessive calls, leading to discussions on potential optimizations. - **Historical Context of Ruby Profilers**: The presentation reviews the evolution of Ruby profilers, highlighting challenges faced by older profilers due to high overhead that make them impractical for production use. Sampling techniques are favored to mitigate performance impact, though they may lack precision. - **Innovations in Vernier**: Vernier adopts a unique approach by accurately measuring all threads and reporting Global VM Lock (GVL) information, addressing limitations found in previous profiling tools. This allows for better visibility into thread performance and stalls. - **Garbage Collection and Allocation Tracking**: The profiler includes features for tracing garbage collection pauses and allocation behaviors, facilitating deeper insights into memory management and performance regression factors. - **Integration with Rails**: Vernier leverages Rails’ Active Support notifications for tracing database queries, enhancing the ability to correlate timing data with application performance significantly. In conclusion, Hawthorn encourages developers to adopt profiling practices, particularly using Vernier, to gain better performance insights and ultimately improve Ruby code execution speed. He emphasizes the profound benefits of profiling in understanding and optimizing the most critical parts of any application.
Suggest modifications
Cancel