Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Whop & Chop: Cutting CI time in half
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Irina Nazarova
August 27, 2025
Programming
1.4k
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
More Decks by Irina Nazarova
See All by Irina Nazarova
Startups on Rails: 2026 at RubyConf Thailand
irinanazarova
0
340
Using Vite Ruby, Vite Conf 2024
irinanazarova
0
48
Learning to consult. Learning to live. Irina Nazarova @ Friendly.rb 2025
irinanazarova
0
250
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
1k
Programmable colors: bridging design and code @ Figma Confir 2025
irinanazarova
1
490
Startups On Rails 2025 – Sin City Ruby
irinanazarova
2
150
Startups On Rails 2025 @ Tropical on Rails
irinanazarova
0
1.6k
Evolution of realtime and AnyCable Pro – Rocky Mountain Ruby, 2024 Irina Nazarova
irinanazarova
1
250
Rails World 2024 Lightning Talk Irina Nazarova "How to run a Ruby meetup"
irinanazarova
1
130
Other Decks in Programming
See All in Programming
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
技術記事、 専門家としてのプログラマ、 言語化
mizchi
10
4.3k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
210
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
120
RTSPクライアントを自作してみた話
simotin13
0
580
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
180
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
700
JavaDoc 再入門
nagise
0
320
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
660
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
Documentation Writing (for coders)
carmenintech
77
5.4k
What's in a price? How to price your products and services
michaelherold
247
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
Typedesign – Prime Four
hannesfritz
42
3.1k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Docker and Python
trallard
47
3.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Believing is Seeing
oripsolob
1
140
Building Adaptive Systems
keathley
44
3k
Marketing to machines
jonoalderson
1
5.4k
Transcript
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]