[rspec-users] Rspec Rails high overhead

aslak hellesoy aslak.hellesoy at gmail.com
Sun Jan 4 09:43:52 EST 2009


On Sun, Jan 4, 2009 at 3:58 AM, Reza Primardiansyah <
reza.primardiansyah at gmail.com> wrote:

> Greetings,
> I found out that running RSpec on Rails takes too much overhead. It takes
> more than 16s per run although the specs only take less than 6s, like seen
> below. That means almost 11s overhead.
> I can't find the bottleneck. I use latest rspec, and rails 2.2 on Debian.
>
> $ time rake spec
>> (in /home/reza/system)
>>
>> ....................................................................................................................................................................................................................................................................................................................................................
>>
>> Finished in 5.493595 seconds
>>
>> 340 examples, 0 failures
>>
>> real    0m16.497s
>> user    0m14.059s
>> sys     0m2.266s
>>
>
> I know that Debian's ruby is slow. So I tried using enterprise ruby. Not
> much difference
>
> $ time /opt/ruby-enterprise/bin/ruby /var/lib/gems/1.8/bin/rake spec
>> (in /home/reza/system)
>>
>> ....................................................................................................................................................................................................................................................................................................................................................
>>
>> Finished in 3.170093 seconds
>>
>> 340 examples, 0 failures
>>
>> real    0m12.033s
>> user    0m9.948s
>> sys     0m1.735s
>>
>
> The overhead is also felt when using autospec. Even using sqlite's
> in-memory-db doesn't change much.
>
> Can anyone give me hint about what happens and what to do to overcome it?
>

How long does ruby script/server take before the server is up?

Aslak


>
> Thanks all.
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090104/e6cc6cc1/attachment.html>


More information about the rspec-users mailing list