Rspec load time is zero?!

Hi Team,
I was looking forward to contributing to the Discourse project, and I noticed that your RSpec tests load in 0s!

Are there any tips on how to reduce that time, please? In a project of mine, it’s around 30s !

What command did you run? What happened? What did you expect to happen?

You say that the time is zero, but you want it less than zero? The amount of time your project takes has no bearing on how long it takes on Discourse, which is a very large project with thousands of tests.

No, I was looking forward to learn how you made it, please. I want to do the same on my project

>You say that the time is zero, but you want it less than zero?

I have my own project which is taking 30s and I want to reduce that time for my own rails project, so Im using this as a learning opportunity to know how Discourse team reduced their spec files loading to zero.

Where did you see that? To be honest, if something is saying 0.0s, then it’s probably a measurement error :sweat_smile:

Some key things we use to improve RSpec performance are:

1 Like

Thanks for your reply.

Here:

1 Like

I think that might be a side-effect of using parallel_tests. The process which is writing the output doesn’t actually load any tests itself. Instead, it spins up multiple worker processes to run the tests.

I see, thanks so much!

Do you think using spring in CI is good idea?