Repository navigation
perf: playground −427 KB client JS, catalogue props trim, status parity sync - #248
Merged
Merged
Conversation
…616 KB catalogue no longer ships in the client bundle
The client script imported maps-catalogue.json only to build a {code, name}
list for the system select, bundling every entry's tests, invertibility and
descriptions into the page (~503 KB of JS). The list is now trimmed in the
frontmatter and injected as a data attribute (same pattern as /api), dropping
the page's JS to ~76 KB. Prose and the filter placeholder read the count from
the same source, so the hardcoded 289 (stale since the 450/457 waves) cannot
drift again; this also clears the unused-import eslint error.
…on payload shrinks by ~36 KB Astro 7 both server-renders the island and serializes its props, so the catalogue page paid for every entry twice. language, sourceScriptName, destinationScriptName and invertibility.context_rules were never read by the component; drop them from the props mapping and the interface.
…t vectors The sample count was hardcoded at 7,502; the fixture on interscript-ts origin/main (test/fixtures/full-parity.json) holds 7,544 vectors across 271 maps at 100.0%. Point the regeneration comment at the fixture file.
This was referenced Nov 21, 2026
ronaldtse
added a commit
that referenced
this pull request
Nov 21, 2026
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.
Summary
Performance pass plus the two known cleanup items from the #245 round. Measured first; only safe wins taken.
maps-catalogue.jsononly to build a{code, name}list for the system select, bundling every entry's tests/invertibility/descriptions (~503 KB of JS on the page). The list is now trimmed at build time and injected as adata-systemsattribute — the same pattern/apialready uses. Also fixes the pre-existing eslint error (unusedcatalogueimport) and the stale hardcoded "289" in prose + filter placeholder (now computed: 457).MapCataloguenever renders:language,sourceScriptName,destinationScriptName,invertibility.context_rules. No rendered or behavioral change.origin/main(test/fixtures/full-parity.json): 7,502 → 7,544 test vectors, 271 maps at 100.0% (unchanged); the regeneration comment now names the fixture file.Before / after (same machine,
npm run build, ~48 s both, 536 pages)/playgroundJS/playgroundHTML/maps/index.htmldist/totalNet for a cold
/playgroundvisit: −357 KB. The +70 KB of HTML streams and parses faster than the JS it replaces and no longer duplicates map metadata the worker engine never reads.Measured but not taken (out of safe scope)
/mapsstill ships the catalogue twice (SSR markup ~833 KB + hydrated props ~650 KB): fixing that means restructuring the island to fetch-on-mount — a UX/SEO behavior change, not a safe win.transliteration-worker(588 KB) andort.bundle(407 KB) are the actual engines, already lazy-loaded; the 4 × 1.8 MB compiled library JSONs (posix/unicode/var-Cyrl/var-kor) are runtime data for the.imlfallback.about.astro,api.astro,ml.astro— left untouched (outside this round's named scope), same drift class as the playground fix; worth a follow-up.Verification
astro check: 0 errors, 0 warnings; eslint on the four changed files: cleanacadsin-zho-Hani-Latn-2002,alalc-cjm-Cham-Latn-2015full-map parse) reproduce identically on pristine main (verified in a worktree at 623905f): pre-existing, unrelatednode dist/server/entry.mjs):/api/systems→ 200{"count":457,...},?authority=bgnpcgn→ 200,access-control-allow-origin: *,/api/transliterateround-tripАнтон→Anton