Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
The Whop & Chop: Cutting CI time in half
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Irina Nazarova
August 27, 2025
Programming
1.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Whop & Chop: Cutting CI time in half
Irina Nazarova
August 27, 2025
Transcript
26 slides
The Whop & Chop Cutting CI Time in half Irina
Nazarova
Thank you!
3 400000000 800000000 1200000000 1600000000 April 2021 April 2022 April
2023 April 2024 April 2025 1.48B 1.08B Total transaction volume, $ 0.74B 0.52B fast-paced startup built on Rails and Next.js
None
None
The stack 6 Problem: Slow test suite Rspec thoughtbot/ factory_bot
7 github.com/test-prof/test-prof
8 Rspec Minitest TestProf: toolbox to profile slow tests -StackProf
Integration -FactoryProf -TagProf -EventProf github.com/ tmm1/ stackprof
9 Rspec Minitest TestProf: helpers to speed up slow tests
-let_it_be: create test data once for an entire context -factory_default: avoid rebuilding associated objects by reusing a cached instance -before_all: runs setup only once per group
Let’s get to profiling! Find the report in tmp/test-prof/ Review
fl amegraph with Speedscope.app Focus: top method time spent 10
StackProf report 11
Top time-consuming methods -Heavy database activity (Trilogy#query), suggesting lots of
factories or queries. -Calls to external services like Stripe and OpenAI that should be mocked. -Signi fi cant amount of time spent in logging. 12
Let’s switch off logging in test! 13
A custom Sentry logger detected! 14 Let’s go a bit
further
Easy! How much time did we save? 15 Before: Single
process: ~25 min CI (16 workers): ~4 min After: Single process: ~12 min CI: ~2 min 50% CI time saved!
Next suspect: FactoryBot TagProf to watch for AR, factory creations
and Sidekiq jobs factory.create events were now responsible for more than half of the total test execution time 16
Factory Optimization Strategy 1: let_it_be — Create Once, Use Many
Replace let with let_it_be to create the record once for the entire describe block. Don’t use it on objects whose state is modi fi ed by one test. 17
Strategy 2: create_default — create resuable associations 18 Let’s fi
rst pro fi le factories: compare total vs. top-level factories to spot an issue in associations Factory Optimization
Strategy 2: create_default — create resuable associations 19 Factory Optimization
What’s next? 20
Parallelization Swap parallel_tests for test-queue Problem: it splits tests by
fi les. 21 parallel_tests test-queue Solution: split by individual tests.
Sound good? Well… Over 100 tests failed. The errors were
bizarre and seemingly random, with no obvious connection to our changes. 22
The Flaky Test Hunt: A Guide to Isolation Our new
test-queue setup had exposed years of hidden state leakage. 23
How we fought this… 24
Soon on evilmartians.com /chronicles 25
Shoutouts Julia Egorova Igor Platonov Travis Turner Vladimir Dementyev Reach
out:
[email protected]
More Decks by Irina Nazarova
See All by Irina Nazarova
Why start a new company, on Rails and AI, today. SF Ruby Conf 2026, Irina Nazarova
irinanazarova
0
8
Agents on Rails at Deccan Queen on Rails 2026
irinanazarova
0
27
Agents on Rails - Rails at Scale 2026
irinanazarova
0
800
Startups on Rails: 2026 at RubyConf Thailand
irinanazarova
0
570
Using Vite Ruby, Vite Conf 2024
irinanazarova
0
80
Learning to consult. Learning to live. Irina Nazarova @ Friendly.rb 2025
irinanazarova
0
400
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
1.3k
Programmable colors: bridging design and code @ Figma Confir 2025
irinanazarova
1
720
Startups On Rails 2025 – Sin City Ruby
irinanazarova
2
180
Other Decks in Programming
See All in Programming
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
430
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
170
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
840
SODA - FACT BOOK(JP)
sodainc
1
40k
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
320
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
260
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5.5k
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.2k
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.9k
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
4k
WCS-LA-2024
lcolladotor
0
990
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
560
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Automating Front-end Workflow
addyosmani
1370
210k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
Balancing Empowerment & Direction
lara
6
1.4k
Discover your Explorer Soul
emna__ayadi
2
1.3k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
530