Wondering why the endless “bulk updating” takes so long I looked that
the source a bit.
There seems that if there are more than 50 gems missing from the quick
list, a bulk update
is done:
source_index.rb:
use_incremental = missing_gems.size <= INCREMENTAL_THRESHHOLD
(INCREMENTAL_THRESHOLD is 50)
…yet it seems the quick list is always more than 50 gems out of date
(for the
bulk update seems to always be done)
When downloading and extracting both lists, it look like there are 13464
gems
listed in the bulk file and 13432 in the quick list.
(For the curious, they are these files, compressed with zlib:
RubyGems.org | your community gem host
RubyGems.org | your community gem host)
This is a difference of 32 gems, but then perhaps some on the quick list
are out
of date? Or perhaps I got the numbers wrong?
So to make things faster:
-
Since the bulk index is 854k and expands to 20MB, perhaps there’s a
way to
keep that quick index more up-to-date? -
Only 3134 of the 13432 gems are unique gems - 10298 are older
versions
of these gems. I think that people rarely search or install old gems, so
perhaps
the list can be split into a file for latest versions versus old
versions. -
I often search for gems repeatedly, and the bulk index gets pulled
down
repeatedly - why not save this file locally for at least a few hours?
(probably try to implement this myself just now) -
Perhaps if the server is taking strain, a mirror or two could be
set up? I doubt
many people would care about such relatively small files on their
servers -
I’d be willing to ask some people if they’d do a ZA mirror.
Any comments?
Les