[Rubygems-developers] Gem::Specification#copy_of and Rails makes tests startup slow

Eric Hodel drbrain at segment7.net
Fri Dec 10 16:38:36 EST 2004

On 09 Dec 2004, at 17:52, Gavin Sinclair wrote:

> Eric, if you're still reading, you can help investigate this issue by
> applying a simple patch (at bottom of email) against the latest
> specification.rb (which shipped with RubyGems 0.8.3).  Run your tests
> again, and see how many calls are made to #copy_of, and see if
> anything breaks.
> This is an investigative patch only, so you should be careful to
> restore the original afterwards.

Much better on the copy_of calls:

   %   cumulative   self              self     total
  time   seconds   seconds    calls  ms/call  ms/call  name
   0.31    67.62      0.29      416     0.70     2.72  

$ gem -v

Test suite startup is no faster, but now I can no longer be sure 
rubygems is the problem.
(Something in Rails gives widely varying test run times, sometimes 6s, 
sometimes as much as 9s.)

More information about the Rubygems-developers mailing list