Its been a few months since I’ve looked at JRuby and 1.8.6 can be annoying slow at simple things. So this morning I took another look at Ruby1.9 and JRuby. See gist below: 6.587s (1.8.6)... learn more »
class Foo def title "Oh hai." end def buggy puts title if false title = 'Oh noes!' end puts title end end Foo.new.buggy This code outputs: Oh hai. nil Isn’t it odd that the variable... learn more »
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... learn more »
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... learn more »
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,... learn more »
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... learn more »
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... learn more »
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... learn more »
UPDATE: See Part 2 of this for a better solution Note: This monkey-patch only works on Rails 2.2 We recently noticed our mongrels, upon startup, were 244M. Eek. PID USER PR NI VIRT RES SHR... learn more »
As we have been internally discussing how to scale our databases from 10’s of millions of rows to 100’s of millions, database sharding came up. Depending on your data model and your application, sharding data... learn more »