breakdown.md

Each step was A/B tested against the commit just before it (requests/sec at 16 clients, median of 3–5 alternating reps). Every step had its own baseline, so the percentages don't multiply into the totals exactly. A dash means no notable change on that route.

Change Room Messages Sidebar Search Post
No Rack::Deflater, Redis compress: false, no Rack::ETag, 4 workers (measured together) +56% +52% +19% +31% +19%
Puma → Falcon +1% +3% +10% +12% +1%
Static-file checks skipped + tags once per process + Current.account once (together) +10% — +14% +14% —
Per-process fragment copies + cache versions without a DB checkout (together) +13% +20% +6% +8% —
Boost forms as strings — +2% — — +8%
Sec-Fetch-Site instead of CSRF tokens +14% +16% — +9% —
Keep each page's gzip by digest +7% +20% +7% — —
Read cache (PRAGMA data_version) — +10% +16% +14% —
Keep the finished sidebar +227%
Keep finished room / messages / search +352% +129% +254%
Cookies only when they change +17–23% on every read route
Push job query fixes +1%
Restore Rack::Deflater (needed for parity) −1–3% on every route

From Falcon + config fixes to the final optimized app: room +742%, messages +416%, sidebar +491%, search +565%, post +12%. Almost all of the read gain comes from keeping finished pages until the next write, and the CSRF change is what made that possible.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论