Hello and welcome to the first OmbuCast by Ombu Labs. In this screencast we'll
be taking a look at the
and how you can use it to benchmark your Rails application and find, and
hopefully fix bottlenecks in your code.
When working on a Rails project, you may have seen present? calls on
ActiveRecord relationships. This might feel natural, mostly because present?
exists on all objects via ActiveSupport, so you expect the relationship to respond to it,
but it's actually not a very good idea. If all we want to do is check if the
scope returns any results from the database, there are better ways than using
A few weeks ago, I found an interesting project called
Bumbler. If your project uses Bundler,
Bumbler shows you your project's largest dependencies.
When you find yourself staring at the screen after running
bundle exec rails c, you may want to give this tool a try.