TLDR Web Dev · ARTICLES & TUTORIALS
THE WHOP CHOP: HOW WE CUT A RAILS TEST SUITE AND CI TIME IN HALF
Summary from the TLDR Web Dev newsletter
Whop's Rails test suite runtime was cut in half by using TestProf and StackProf to identify performance bottlenecks. The biggest win came from disabling Rails' verbose SQL logging and query log tags in the test environment, which eliminated I/O overhead from thousands of database queries being written to disk. Additional optimizations included disabling Sentry logging during tests and addressing FactoryBot overhead, reducing single process test runs from ~25 minutes to ~12 minutes and CI runs from ~4 minutes to ~2 minutes.