Monthly Archives: July 2011

Looking back at Blacklight selection and implementation

In a couple weeks (cross fingers, knock on wood) we are going live with our Blacklight implementation, completely replacing the legacy OPAC in user-facing services. Blacklight is based on Rails and Solr. A colleague at another institution asked a couple … Continue reading

Posted in General | Leave a comment

Beware of ActiveSupport::Memoizable

“Memoization” is a very useful technique to keep your code efficient and well-organized.  Back when I first learned it (from the NeXT/Apple WebObjects framework), people called it “lazy load” or “lazy load with caching”, but “memoization” seems to be what … Continue reading

Posted in General | 1 Comment

the danger of no timeout set on a database connection: rails mysql

I have a rails app (ruby 1.8) that makes database connections using the ‘mysql’ adapter. (It’s an old app written before ‘mysql2′ even existed, currently running on ruby 1.8.6 where ‘mysql2′ isn’t supported, on rails2). I am not sure if … Continue reading

Posted in General | 2 Comments

Kaminari dangerous for high page counts

kaminari is a rails plugin with a very nice API for pagination. When migrating my app from rails2 to rails3, I replaced the under-maintained and not-as-flexible-as-desired will_paginate library with kaminari. (This was actually a change done in the Blacklight engine … Continue reading

Posted in General | Leave a comment

more thoughts on unbearably slow rails3

So as mentioned before, my specific app converted to Rails3 is horribly slow (300% to 400% slower than it was before conversion in Rails2), and the slowness seems to be attributable to ruby Garbage Collection.  And in fact, contrary to … Continue reading

Posted in General | 19 Comments