There are a lot of reasons why test suites for large applications become slow. One of them - errant sleep statements in your code - is easy to fix and, with the rspec-sleep_study gem, easy to find.
Any time you find a spec that takes a nice, round number of seconds to complete, you should immediately be suspicious. Especially when the code under test integrates with another service or makes any kind of network calls.
This is usually a sign that you have a sleep somewhere in your code, and your specs are blocking while they wait for the sleeps to complete.
The solution to this is generally easy: you need to stub out the sleep statements or the sleep interval in your specs. But how do you find out which specs are blocking, and where, so that you can fix them? That's where Sleep Study comes in.
Sleep Study uses Ruby's TracePoint class to wrap every C function call and return executed by your code. If it detects a sleep function, it records the time spent sleeping and then prints a report showing you both the spec and the line(s) of code responsible.