Posted on 12/29/2008, 6:01 pm, by warren, under
Rails.
We’ve been hearing great things about Merb routing so a few weeks ago, we wanted to see if we could get it working in a Rails application as a proof of concept. The goal of this project was to use the Merb routing engine along with router.rb and without touching any of our existing Rails [...]
Posted on 11/26/2008, 6:29 pm, by warren, under
All,
Rails.
Here’s a proof of concept plugin that will monkeypatch Rails or Merb routing to allow you to define “acts as blocks” anywhere throughout your application (i.e. a plugin) and then use them in your routes file.
Imagine the plugin acts_as_commentable defines the following in its init.rb:
ActionController::Routing.routes_for_acts_as(:commentable) do |map|
map.resources :comments
map.best_comment ‘/best-comment’, :controller => [...]
Posted on 11/21/2008, 2:47 am, by aaron, under
All,
Rails.
In the previous post, I did some JRuby testing and noticed perf improvements over time.
Mark Imbriaco, of 37Signals, asked how it compared to MRI. I was curious too.
I can’t promise a “clean” comparison, your mileage may vary, but… MRI was:
Completed in 552ms (View: 104, DB: 14) | 200 OK [http://someurl.com/people/3]
Completed in 345ms (View: 60, DB: [...]
Posted on 11/19/2008, 9:35 pm, by aaron, under
All,
Rails.
We ported our Rails application to JRuby in order to do some GC comparisons yesterday. Not a ton of changes required. Mostly replacing gems with native dependencies. YAML is a bit more strict than its MRI counterpart…. but all told, thats pretty amazing! Nice job JRuby crew!
That said…. one interesting, entirely un-scientific, test [...]
Posted on 11/19/2008, 8:56 pm, by aaron, under
All,
Rails.
After porting our production application to Rails 2.2, we noticed a major memory leak.
Beforehand, monit would restart instances a handful of times a day. After Rails 2.2, monit restarted instances THOUSANDS of times a day.
This is a graph of one of our haproxy instances a couple days ago.
We looked at everything, including time spent [...]
Posted on 11/11/2008, 1:53 am, by aaron, under
All,
Rails.
UPDATE I’ve added a patch to Rails Edge for this fix, which is much different than the patch below. See here
In a previous article, I called out the massive memory usage of the default rails resource behavior, and it seems others have as well. In an attempt to decrease the number of routes, [...]