# RSpec Performance

**URL:** <https://www.ruby-forum.com/t/rspec-performance/128813>\
**Category:** Rails\
**Created:** [February 11, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/rspec-performance/128813 "2008-02-11T19:55:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [February 11, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/rspec-performance/128813/1 "2008-02-11T19:55:31Z")

</div>

I’m a windowx xp user and a simples “rake spec” consisting of 1 spec  
with 1 exaple takes about 3-4 seconds to run on a Intel Q6600 with  
almost no load.

Is this right? Is there a way to make it faster?

Every screencast that I watch when people try the same stuff on a Mac  
it runs in 4-6 miliseconds. I know that apple computers are better and  
stuff, but what’s the reason for such a big diference in performance?

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [February 11, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/rspec-performance/128813/2 "2008-02-11T20:27:59Z")

</div>

I know this doesn’t help you, but on my XP laptop it would take 5-10  
seconds to create a new app with the Rails command. When I go my  
Macbook it takes about 1 second. The Windows machine had more GHz and  
RAM, too.

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [February 12, 2008, 3:15am UTC](https://www.ruby-forum.com/t/rspec-performance/128813/3 "2008-02-12T03:15:29Z")

</div>

Well, I didn’t find and explanation yet.  
I’ll try and profile the spec task to see what’s slowing things down.  
I’ll post back if I find anything.

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [February 12, 2008, 3:38am UTC](https://www.ruby-forum.com/t/rspec-performance/128813/4 "2008-02-12T03:38:57Z")

</div>

On Feb 11, 2008 9:15 PM, Rafael B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Well, I didn’t find and explanation yet.  
> I’ll try and profile the spec task to see what’s slowing things down.  
> I’ll post back if I find anything.

Please also post to the rspec tracker ([http://rspec.lighthouseapp.com](http://rspec.lighthouseapp.com))  
if you do.

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [February 12, 2008, 6:04am UTC](https://www.ruby-forum.com/t/rspec-performance/128813/5 "2008-02-12T06:04:33Z")

</div>

Quoting Rafael B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I’m a windowx xp user and a simples “rake spec” consisting of 1 spec  
> with 1 exaple takes about 3-4 seconds to run on a Intel Q6600 with  
> almost no load.
> 
> Is this right? Is there a way to make it faster?
> 
> Every screencast that I watch when people try the same stuff on a Mac  
> it runs in 4-6 miliseconds. I know that apple computers are better and  
> stuff, but what’s the reason for such a big diference in performance?

On my four year old ThinkPad (T41) w/ 1600MHz Pentium M, 77 RSpec  
examples run  
in 3.6sec including load time using “script/spec spec”. It is running  
SuSE  
Linux. Once loaded the examples run in under 2 seconds. “rake spec”  
takes  
approximately twice as long.

HTH,  
Jeffrey

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [February 12, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/rspec-performance/128813/6 "2008-02-12T19:55:55Z")

</div>

Rafael B. wrote:

> > > it runs in 4-6 miliseconds. I know that apple computers are better and  
> > > stuff, but what’s the reason for such a big diference in performance?

Can you make sure that ruby is in your path early on in Windows? I use  
InstantRails and it has a command called use\_ruby.cmd that sets the path  
to Ruby in its directory. That makes Rails and Ruby respond a lot  
faster.

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [February 13, 2008, 11:42am UTC](https://www.ruby-forum.com/t/rspec-performance/128813/7 "2008-02-13T11:42:07Z")

</div>

The ruby/bin directory is the first one in my PATH entry. That is not  
the problem =/
