All threads / Speed up Rails boot times with Bootsnap Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Speed up Rails boot times with Bootsnap Discussion

Fritz Rodriguez Jr. ·

Hey Chris! This is really helping booting my apps faster! Thanks so much!

Reply
Ron Huppert ·

I implemented this and my memory consumption on Heroku went up by 40Mb. The truth is I wonder if I even need this on a Heroku production environment. Is it advisable to run this in development only?
For boot.rb:
require 'bootsnap/setup' if Rails.env.development?

Yeah, it's encouraged for production, because production will boot faster. The extra RAM usage is going to come from the cache it because that's how it boots faster. It's trading RAM for speed.

Certain memory constrained environments, like Heroku typically is, may not be a great place to do this if you're struggling to keep your app's memory usage down. Otherwise, you should basically use this all the time.

Thanks, Chris. I didn't expect a reply on Saturday. Take the rest of the weekend off!
Since it will be in 5.2, I will bite the memory bullet.

Masud Rana Hossain ·

I would go to digitalocean (use hatch if you don't wanna waste time setting up). We moved away from Heroku and it was the best decision we made.

Hi Masud. Recently I moved from AWS to Heroku and that was the best decision I made. Everything worked out-of-the-box. The application itself, solr, the database. Everything was reeeally easy to set up.

I didn't check Digital Ocean though. Could you elaborate on why Digital Ocean was the best decision for you? Thanks!

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,629+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.