News for hackers. Stuff that matters.
Re:Garbage Collection in Ruby 2.1 by venus on Monday December 30, 2013 @05:31AM (#6984002)
What's this RailsApp.preload_all method mentioned in this post? Is that a github thing?

Great post btw. I am looking forward to getting some production apps onto 2.1 in the coming weeks and seeing how performance characteristics have changed in the new release.

Re:Garbage Collection in Ruby 2.1 by tmm1 on Monday December 30, 2013 @06:12AM (#6984104)
We implement preload_all, which loops over app/{models,controllers}/ and requires everything. This method is generally called from config.ru, and happens in the unicorn master before it forks off workers.

I recently upstreamed a warmup method for Rack::Builder you can also use for this purpose: https://github.com/rack/rack/pull/617

Re:Garbage Collection in Ruby 2.1 by venus on Monday December 30, 2013 @09:26AM (#6984694)
Thanks for that link (and for submitting it!). I've done something similar in deploy scripts, to warm up a fresh instance before bringing it into rotation - even better having it able to be baked into rack like that.
Re:Garbage Collection in Ruby 2.1 by purephase on Monday December 30, 2013 @09:59AM (#6984835)
That's interesting. Thanks for sharing. I'll have to check this out.