[Rubygems-developers] Updating source index is slow

Hugh Sasse Staff Elec Eng hgs at dmu.ac.uk
Wed Nov 10 08:11:16 EST 2004

On Wed, 10 Nov 2004, Chad Fowler wrote:

>> I may be ignorant here -- I'm assuming the client is hitting 
>> http://gems.rubyforge.org/yaml
> You're right.  It grabs (and caches) all of the gem metadata.   Your idea for
> How big an issue does it seem to be?  For me, the gem repository doesn't 
> update (and therefore I don't have to redownload the yaml) enough to be a 
> serious drag, but I can see how as more gems are released it will get more 
> annoying on the client.

A quick glance through the code suggests that it doesn't try to use
compression by default. HTTP headers like:

  "accept-encoding" => "gzip;q=1.0, " + "identity; q=0.5, " + "*;q=0 "

which we can handle with things in the standard library now, something like:

   if answer.key?("content-encoding")
     case answer["content-encoding"]
     when 'gzip'
       gz = Zlib::GzipReader.new(StringIO.new(answer.read_body))
       body = gz.read

[Cut, pasted and pruned from my hacked version of rubric]
> Chad


More information about the Rubygems-developers mailing list