# Rspec load time is zero?!

**URL:** https://meta.discourse.org/t/rspec-load-time-is-zero/391912
**Category:** Development
**Created:** [December 22, 2025, 12:57pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912 "2025-12-22T12:57:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Hanaffi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hanaffi/32/536803_2.png) [@Hanaffi](https://meta.discourse.org/u/Hanaffi)
#### Post date: [December 22, 2025, 12:57pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/1 "2025-12-22T12:57:20Z")

</div>

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 !

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [December 22, 2025, 1:53pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/2 "2025-12-22T13:53:33Z")

</div>

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

> [@Hanaffi](#):
>
> Are there any tips on how to reduce that time, please? In a project of mine, it’s around 30s !

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.

---

<div class="post-metadata">

### Author: ![Hanaffi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hanaffi/32/536803_2.png) [@Hanaffi](https://meta.discourse.org/u/Hanaffi)
#### Post date: [December 22, 2025, 2:06pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/3 "2025-12-22T14:06:23Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Hanaffi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hanaffi/32/536803_2.png) [@Hanaffi](https://meta.discourse.org/u/Hanaffi)
#### Post date: [January 9, 2026, 1:39pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/4 "2026-01-09T13:39:24Z")

</div>

\>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.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 9, 2026, 1:51pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/5 "2026-01-09T13:51:44Z")

</div>

> [@Hanaffi](#):
>
> I noticed that your RSpec tests load in 0s!

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

Some key things we use to improve RSpec performance are:

- [GitHub - grosser/parallel\_tests: Ruby: 2 CPUs = 2x Testing Speed for RSpec, Test::Unit and Cucumber · GitHub](https://github.com/grosser/parallel_tests)

- [test-prof/docs/recipes/let\_it\_be.md at master · test-prof/test-prof · GitHub](https://github.com/test-prof/test-prof/blob/master/docs/recipes/let_it_be.md) (we wrap this in a `fab!` helper in our codebase)

---

<div class="post-metadata">

### Author: ![Hanaffi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hanaffi/32/536803_2.png) [@Hanaffi](https://meta.discourse.org/u/Hanaffi)
#### Post date: [January 9, 2026, 1:56pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/6 "2026-01-09T13:56:53Z")

</div>

Thanks for your reply.

Here:

[https://github.com/discourse/discourse/actions/runs/20852657462/job/59911214814](https://github.com/discourse/discourse/actions/runs/20852657462/job/59911214814)

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/b/c/dbcbb5701d8c2f549185f583714d98025a162ee9.png)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 9, 2026, 1:58pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/7 "2026-01-09T13:58:27Z")

</div>

I think that might be a side-effect of using [parallel\_tests](https://github.com/grosser/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.

---

<div class="post-metadata">

### Author: ![Hanaffi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hanaffi/32/536803_2.png) [@Hanaffi](https://meta.discourse.org/u/Hanaffi)
#### Post date: [January 9, 2026, 2:00pm UTC](https://meta.discourse.org/t/rspec-load-time-is-zero/391912/8 "2026-01-09T14:00:15Z")

</div>

I see, thanks so much!

Do you think using spring in CI is good idea?
