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
Irina Nazarova
August 27, 2025
Programming
1.5k
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
430
Using Vite Ruby, Vite Conf 2024
irinanazarova
0
56
Learning to consult. Learning to live. Irina Nazarova @ Friendly.rb 2025
irinanazarova
0
300
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
1.2k
Programmable colors: bridging design and code @ Figma Confir 2025
irinanazarova
1
580
Startups On Rails 2025 – Sin City Ruby
irinanazarova
2
160
Startups On Rails 2025 @ Tropical on Rails
irinanazarova
0
1.8k
Evolution of realtime and AnyCable Pro – Rocky Mountain Ruby, 2024 Irina Nazarova
irinanazarova
1
270
Rails World 2024 Lightning Talk Irina Nazarova "How to run a Ruby meetup"
irinanazarova
1
140
Other Decks in Programming
See All in Programming
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
270
Android CLI
fornewid
0
220
AIを紡ぐPMのお話
swdtkuy
0
110
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
470
源内ハンズオン概要編
hideg
0
190
Google Apps Script で Ruby を動かす
kawahara
0
240
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
190
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.5k
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
260
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
数百円から始めるRuby電子工作
tarosay
0
160
Featured
See All Featured
Speed Design
sergeychernyshev
33
2k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
56k
Typedesign – Prime Four
hannesfritz
42
3.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
420
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
410
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
660
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
490
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
470
The Spectacular Lies of Maps
axbom
PRO
1
910
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
610
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]