•  

New Ruby 2.1 Awesomeness: Fine-grained Object Allocation Tracing

A session at RubyConf 2013

Saturday 9th November, 2013

4:00pm to 4:45pm (EST)

Ruby 2.1 is coming out soon with an amazing new feature under ObjectSpace: #trace_object_allocations. We are now able to trace the file and line number (as well as method) where any Ruby object is allocated from. This is a very welcome feature, as object-level tracing has been very difficult in Ruby, especially since the memprof gem could not support Ruby past 1.8.x.

This new Ruby 2.1 feature is really just exposing some raw (and vast) data, so it can be difficult to tease out meaningful information. Two gems are introduced in this talk to solve just that problem. The objspace-stats gem allows us to view and summarize new object allocations in meaningful ways. We'll look at how to filter, group, and sort new object allocations. The second gem is rack-objspace-stats. We'll see how this tool can intercept requests to a Rack stack, and measure new object allocations taking place during the request. (For those familiar, this works very similar to the rack-perftools_profiler gem.)

We'll look at various examples of how this new Ruby 2.1 feature, and these tools can help an organization reduce unnecessary memory allocations, and speed up their code, especially mature Rack applications.

About the speaker

This person is speaking at this event.
Sam Rawlins

Sign in to add slides, notes or videos to this session

Tell your friends!

When

Time 4:00pm4:45pm EST

Date Sat 9th November 2013

Short URL

lanyrd.com/scrtgg

Official event site

rubyconf.org

View the schedule

Share

See something wrong?

Report an issue with this session