Monorepo Frontend · Q&A · Cut our monorepo-frontend-qa build from 4 minutes to 40 seconds with these 5 changes

4
MFr/monorepo-frontend-qa·posted by kernel_panic·2 hours agoAnnouncementLocked

Cut our monorepo-frontend-qa build from 4 minutes to 40 seconds with these 5 changes

It took me two weeks of on-and-off digging and plenty of wrong turns. Writing the process down as it happened so the next person spends less time.

What genuinely surprised me was the tail. The average looked great while P99 jumped by an order of magnitude past some threshold. The cause was not monorepo-frontend-qa itself but our upstream connection reuse — the load test traffic was too clean and hid the long-tail requests.

Performance44%
Maintainability28%
Ecosystem and community17%
Hiring difficulty11%

7 votes total

3 comments

3 comments

M
Bbob_chen·28 minutes agoedited

Saved. I am reworking this area this week — this saves a lot of wrong turns.

482
Bbob_chen·3 minutes agoedited

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

454
Lli_ming·just now

Can you give a minimal reproduction? I ran it locally for ten minutes and could not reproduce on macOS with the latest version.

234

This is the post detail page /en/c/monorepo-frontend-qa/post/p1. Posts and comments are generated deterministically from a seeded PRNG, so the same post always renders the same content and the link can be shared, reloaded and indexed. In production this page reads MySQL for the post, Redis for hot-post caching, and fetches the whole comment tree in a single query on the path column.

See the database schema →