Tech Team

  • JRuby "include?" 2x faster than 1.8.6?

    Jul 07, 2009 | Posted by aaron in Ruby

    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 »

  • Ruby Scoping Bug?

    Jan 01, 2009 | Posted by warren in Ruby

    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 »

  • Merb routing in Rails – Today!

    Dec 12, 2008 | Posted by warren in 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... learn more »

  • Modular routing in rails and merb (acts_as_routing)

    Nov 11, 2008 | Posted by warren in 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... learn more »

  • JRuby and why it might be nice to be back on the JVM – Part 2

    Nov 11, 2008 | Posted by aaron in Ruby

    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 »

  • JRuby and why it might be nice to be back on the JVM

    Nov 11, 2008 | Posted by aaron in Ruby

    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 »

  • Are your mongrels growing by 20MB/request on Rails 2.2? Blame AssetTag!

    Nov 11, 2008 | Posted by aaron in 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... learn more »

  • How to save 100m of RAM per mongrel (Part 2)

    Nov 11, 2008 | Posted by aaron in Performance

    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 »

  • How to save 100m of RAM per mongrel

    Nov 11, 2008 | Posted by aaron in Performance

    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 »

  • MRI Ruby + MySQL + Threads == Stop the world… JRuby doesn’t

    Aug 08, 2008 | Posted by aaron in Ruby

    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 »