Specs run EXTREMELY slow on windows xp
Reported by Rafael Barbosa | February 21st, 2008 @ 09:07 PM
Well, I don't know if this is the expected behavior but anyway, I started using rspec now and when I try to run 1 single spec it takes 10 seconds to finish.
I asked around and all the MAC users I know report that their systems takes like 100x less time to do the same rake spec.
Is this solvable? I'm using revision 3317 of rspec and windows xp SP2.
Comments and changes to this ticket
-
David Chelimsky February 21st, 2008 @ 11:21 PM
- → State changed from new to open
"Is this solvable?" implies that we know why it is a problem :) I have no idea if it is solvable or not.
That said, I don't run on windows personally, so I'm not personally able to solve it if even it is solvable.
Is there anyone paying attention to this who is interested in taking on the role of rspec/windows maintainer?
-

Rafael Barbosa February 22nd, 2008 @ 01:30 AM
Sorry David, I thought this was a known issue of some kind.
I don't think I have enough ruby experience to help much, but if you give me some guidelines maybe I can profile the code in my machine or something like that.
-
Aslak Hellesøy February 22nd, 2008 @ 07:54 AM
Rafael,
Are you using RSpec with Rails or not? What are your versions of relevant software.
Can you provide a minimal example that we can use to reproduce your situation?
-

Rafael Barbosa February 22nd, 2008 @ 12:39 PM
Aslak,
I'm using RSpec with Rails 2.0.2
Windows XP sp2
The box is an Intel Q6600-g0 with 2GB of RAM
I made sure ruby/bin is the first entry in my PATH variable, as a friend advised me to do, with no effect.
I'm using the basic cmd console. Haven't tested with cygwin yet.
Well, I'm doing the simplest of the specs. Spec'ing an auto-generated model spec of an almost empty model. (But i'll upload both the model and the spec)
It takes about 10 seconds to finish running and it says "Finished in 3.203 seconds" when it does.
-
Aslak Hellesøy February 22nd, 2008 @ 03:15 PM
What rspec version/rev?
Is it slow with a simple non-rails spec too? Try spec bowling_spec.rb
from the home page.
-

Rafael Barbosa February 22nd, 2008 @ 01:49 PM
Ok. I tested with and without rails.
bowling_spec.rb
Finished in 0.063 seconds
1 example, 0 failures
---
municipio_spec.rb (needs rails, called with 'rspec/bin/spec' or 'rake spec')
Finished in 2.547 seconds
1 example, 0 failures
-
Aslak Hellesøy February 22nd, 2008 @ 04:05 PM
This tells me that it's Rails that is slow on your machine - not RSpec.
Can you write a Test::Unit test and compare?
-

Rafael Barbosa February 22nd, 2008 @ 05:24 PM
Ok, I found something interesting.
I was using a remote postgresql database. If I use a local one it goes 3 seconds faster. But, it stills takes about 5 seconds to load before showing me any result.
C:\Documents and Settings\rafael\My Documents\NetBeansProjects\coleira\spec\models>rake spec
(in C:/Documents and Settings/rafael/My Documents/NetBeansProjects/coleira)
.
Finished in 0.391 seconds (Actually in my stopwatch it took 6.43 seconds to run)
1 example, 0 failures
---
In Test::Unit same situation:
Loaded suite C:/Documents and Settings/rafael/My Documents/NetBeansProjects/coleira/test/unit/bairro_test
Started
.
Finished in 0.36 seconds. (same here, about 5-6 seconds)
1 tests, 1 assertions, 0 failures, 0 errors
----------
The problem is clearly rails, its taking ages for my system to load it. So, what should I do now?
-
Aslak Hellesøy February 22nd, 2008 @ 05:42 PM
- → State changed from open to invalid
- → Assigned user changed from to Aslak Hellesøy
I think we have established that this is not an RSpec issue.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Behaviour Driven Development for Ruby.
