cwninja/geminabox — pull request #82 by natw (2012-10-26 14:30:08+00:00)
Title: Don't re-sort GemVersionCollection every time you add a gem

We have a decently large gem repository at work (almost 800 gems), and geminabox is pretty much unusable. Loading the index or uploading a gem is a ~30 second affair.

This change fixes it so that GemVersionCollection sorts its gem list only once on initialization, instead of every time a gem is pushed onto the list. I haven't done any hard benchmarks, but the usual operations are now as close to instantaneous as I would reasonably expect.