docs(readme): replace the dead bundlephobia badges, and correct the size claim - #1614
Merged
Conversation
…ize claim
Both bundlephobia badges rendered as "bundlephobia 429": badgen's endpoint is
rate limited by an upstream service that is effectively unmaintained, and
shields' equivalent returns "rate limited by upstream service" too. They read as
a duplicate badge because both failed to the same error text, though they were
meant to report minzip size and tree-shaking. Replaced with a working bundlejs
size badge; there is no tree-shaking equivalent. DOC_README carried the same
dead badge, linked to an unrelated repository's LICENSE file.
With a badge reporting a real number again, the neighbouring prose was wrong:
it claimed ~150 KB minzipped, written at 19.7.1 before WebGPU, 3D meshes, the
glTF loader and the blend mode shaders landed. Measured at 20.2.0: 246 kB gzip
locally via esbuild, 254 kB via bundlejs. Quoted as ~250 KB, which is the
resolution the two agree at.
Also drops the tree-shaking justification behind the "lightweight" framing,
because the numbers do not support it. Measured against the shipped
build/index.js, which is the single file a consumer's bundler actually sees:
import { Vector2d } 184 kB gzip
import { Application } 230 kB
the platformer example's real 31 imports
234 kB
the whole barrel 246 kB
So there is a 184 kB floor, and a real game saves about 5% rather than a large
fraction. `sideEffects` is declared correctly, so this is not a missing hint —
everything transitively reaches the renderers. The engine is described as fully
featured instead, and the size is left to speak for itself.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Aa37KGXZcnVrbn1yG4j1N
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both bundlephobia badges rendered as
bundlephobia 429. badgen's endpoint israte limited by an upstream service that is effectively unmaintained, and
shields' equivalent returns "rate limited by upstream service" too. They looked
like a duplicated badge because both failed to the same error text, though one
was meant to report minzip size and the other tree-shaking. Replaced with a
working bundlejs size badge; there is no tree-shaking equivalent.
DOC_README.mdcarried the same dead badge, with its link pointing at anunrelated repository's LICENSE file.
The size claim was stale
With a badge reporting a real number again, the neighbouring prose was wrong. It
claimed ~150 KB minzipped, written at 19.7.1 in June, before WebGPU, 3D meshes,
the glTF loader and the blend mode shaders landed. Measured at 20.2.0: 246 kB
gzip locally via esbuild, 254 kB via bundlejs. Quoted as ~250 KB, the
resolution the two instruments agree at.
And "lightweight" rested on tree-shaking, which does not hold up
Measured against the shipped
build/index.js— the single 2.1 MB file aconsumer's bundler actually sees, since the other entries under
build/are.d.tsonly:Vector2daloneApplicationThere is a 184 kB floor: importing a single vector class pulls three quarters of
the engine, and a real game saves about 5% rather than a large fraction.
sideEffectsis declared correctly (./src/polyfill/**), so this is not amissing hint — everything transitively reaches the renderers.
So the tree-shaking sentence is removed rather than left as an aspiration, the
engine is described as full-featured, and the size speaks for itself. The 184 kB
floor is a real finding but a separate concern from this README wording, and is
not addressed here.