[spare] perf(resume): serve precompressed gzip twins of the text assets #174
No reviewers
Labels
No labels
needs-human
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
cjournois/resume!174
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/spare-optimize-resume"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Nothing on the resume path compresses. The nginx conf has no
gzip, and the dramblesecurity-chainhas no Traefikcompressmiddleware. Live logs show the 380 KB JS bundle going out raw, and the JS is 49% of first-load bytes. The server is idle (11 MiB of 32 MiB, about 0.6 mCPU), so transfer size is the axis worth working on.What
99be584test:bench/first-load.tsplus abenchrecipe that measures a first load through the production nginx conf. Committed before the change, as the baseline.12b0425perf: aprecompress-distVite plugin writes a level-9.gzbeside each text asset indist/, only when that is smaller. nginx serves the.gzfiles withgzip_static on; gzip_vary on; gzip_proxied any;, so nothing is compressed per request. Fonts and images are untouched.Numbers
12 runs per variant, interleaved, with an A-vs-A floor. Byte counts are deterministic.
The JS goes from 380 076 B to 118 634 B. Loopback latency, nginx CPU and peak memory are within noise; no millisecond win is claimed.
Check
just lint testis green: 190 bun tests, 14 Playwright, helm render tests.Content-Encoding: gzipandVary: Accept-Encodingon text responses; ETag 304s still work.Not run: the Containerfile image build and
e2e-full.Session: 0e3485b3-1a4a-4b43-b4ba-4f6918ae6e83
WIP: [spare] perf(resume): serve precompressed gzip twins of the text assetsto [spare] perf(resume): serve precompressed gzip twins of the text assets