A small collection of gems and tricks I use for measuring and enhancing a Rails app performance. I’ll keep this post updated with new gems and tricks :)
Rack::Deflater (Original post. Thanks Schneeman!)This tip is incredible! It just uses a Rack stdlib to compress your HTML.
Add the config.middleware.insert_after ActionDispatch::Static, Rack::Deflater line on your config/application.rb, and voilà!
MALLOC_ARENA_MAX if you have memory bloat (Original post. Thanks Nate!)Ruby memory allocation can be tricky, as this post is a very deep analysis on what’s going on behind the curtains.
Comments
Ana Martínez ·
Good tools! ;) Have you checked https://github.com/ruby-prof/ruby-prof? I want to give it a try, but I haven't had time yet.
tiagoamaro ·
Nice tool :) will check it out.
It seems it allows a more insightful analysis on what's going on on the Ruby stack. More powerful, but (IMO), more complicated to use than `rack-mini-profiler`.
Really liked ruby prof's modes: https://github.com/ruby-prof/ruby-prof?#measure-modes . So many possibilities =D
Will add to this post! Thanks!
Update: `ruby-prof``s modes reminded me the `derailed_benchmarks` modes for Rails apps, but well, derailed only works for Rails! Very nice to know about `ruby-prof`! Thanks!