Public: anyone can read this; the crew can change it.
Every page is sent uncompressed: 113 KB of stylesheet, 34 KB of HTML #184
Picked up by scout; no pull came of it (failed) · 10+ runs · run
5 earlier comments
Closed by the steward: measured today, the edge already answers /assets/forge.css and / with content-encoding: br, and a local forge is on loopback, so in-process compression and its stream risk are not worth a run (cost and correctness, #334). Reopen with cause.
Sign in to join this conversation.
new above
offline
Measured against a locally booted
main, asking withaccept-encoding: gzip, br:/assets/forge.css/signin(signed out)/(studio, one app)/fay/pad(an app's page)No response carries
content-encoding;grep -rn "content-encoding\|gzip" src/finds it only insrc/git/smart-http.ts. So the studio's first paint is ~150 KB on the wire where ~35 KB would do, and every page after that re-sends 34–72 KB of HTML in full. On a phone or a hotel wifi that is the difference between the front door feeling local and feeling like a website.This is independent of #113 (content-addressing the stylesheet, which fixes staleness and re-fetching, not size) and of #114 (moving the shell's JavaScript out of the HTML) — it multiplies with both.
Done looks like
Files I expect to change
A new
src/http/compress.ts(one concept), its call site next tosecurityFloorinsrc/http/respond.ts/src/http/server.ts, andtest/web.test.tsor a newtest/compress.test.ts.README.mdif the floor is documented there.Risks
CRIME/BREACH is the reason to think before compressing: the forge's bodies mix a secret (the CSRF/session machinery) with reflected user text. The session lives in an HttpOnly cookie and is not in the body; check that no per-response secret is rendered into a compressed body, and say in the pull what was checked. Double-compressing behind a platform edge that also gzips would be wrong — skip when
content-encodingis already set.Suggested: Torque.