Quote the compressed size again, now that the public path serves it
The button briefly said 8.6MB. That was measured through Caddy, which is what garden.c0smere.net resolves to on the LAN -- split-horizon DNS, so every test from indoors had been hitting the internal proxy rather than the public one. A real visitor comes in through NPM on the VPS, and NPM now passes Accept-Encoding through for /cn/, so they get about 3.0MB. The LAN path is still uncompressed and that is fine: it is a LAN. Public is the number that belongs on a public page, and rawBytes stays in the manifest if that ever stops being true. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S4wdbGSVzvUDHBWRjSVxfr
This commit is contained in:
+13
-12
@@ -12,15 +12,17 @@ const builtAt = build?.builtAt
|
|||||||
timeZone: 'America/New_York',
|
timeZone: 'America/New_York',
|
||||||
})
|
})
|
||||||
: null;
|
: null;
|
||||||
// The RAW total, not the gzipped one, because that is what a visitor to
|
// The gzipped total, which is what a public visitor pays: cyrion serves the
|
||||||
// garden.c0smere.net actually pays: NPM on the VPS blanks Accept-Encoding for
|
// .gz siblings via gzip_static, and NPM now asks for them (a `location ^~
|
||||||
// every proxied request (its own nginx.conf:44), so cyrion's gzip_static is
|
// /cn/` in that host's advanced config -- needed because NPM blanks
|
||||||
// never asked and answers uncompressed. The .gz files exist and are correct;
|
// Accept-Encoding globally AND its assets.conf caches *.js from a regex
|
||||||
// nothing public reaches them yet. Switch this to build.wireBytes -- about a
|
// location with Vary stripped, which would pin one encoding for everyone).
|
||||||
// third of the size -- once NPM passes the header through. Overstating the
|
//
|
||||||
// cost is the safe direction for a button whose whole job is to be honest
|
// On the LAN it is still the raw figure: garden.c0smere.net resolves to Caddy
|
||||||
// about it. rawBytes is absent from exports made before this was noticed.
|
// indoors, not NPM, and Caddy hands back uncompressed. Public is the number
|
||||||
const overTheWire = build ? mb(build.rawBytes ?? build.wireBytes) : null;
|
// that belongs on a public page, and rawBytes is in the manifest if that ever
|
||||||
|
// stops being true.
|
||||||
|
const overTheWire = build ? mb(build.wireBytes) : null;
|
||||||
---
|
---
|
||||||
|
|
||||||
<Base
|
<Base
|
||||||
@@ -50,9 +52,8 @@ const overTheWire = build ? mb(build.rawBytes ?? build.wireBytes) : null;
|
|||||||
<button class="cn-start" type="button" data-src={cannonsFrameUrl}>
|
<button class="cn-start" type="button" data-src={cannonsFrameUrl}>
|
||||||
<span class="cn-start-label">Play</span>
|
<span class="cn-start-label">Play</span>
|
||||||
<span class="cn-start-sub">
|
<span class="cn-start-sub">
|
||||||
downloads about {overTheWire} MB — {mb(build.bytes['classes.js'])} MB
|
downloads about {overTheWire} MB — the client, the server, and
|
||||||
of client, {mb(build.bytes['cannons.wasm'])} MB of server, and the
|
the game's own art, compressed
|
||||||
game's own art
|
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user