Repository navigation
perf(web): the place catalog and the diff library leave startup - #1035
Merged
Merged
Conversation
The startup bundle sat about 1 KB under its 915 KB gzip budget in CI. The project menu's brief link (projectBrief.ts) took its arrival hash from appPlaceLinks.ts, which reads the whole place catalog, so the catalog was back at startup (about 13.5 KB). The hash helpers now live in placeArrival.ts, and the chat's place-link check in @threadlines/shared/placeHref, neither of which reads the catalog. diffStats.ts imported the `diff` library for countTextReplacementStats, which only the server uses; the library's module state kept it in the web bundle (about 4.3 KB). That function moved to textReplacementStats.ts. Startup closure: 912,236 B -> 894,411 B gzip locally.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
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.
The web app's startup code sat about 1 KB under its 915 KB gzip budget in CI, so the next feature would fail the bundle check.
Two things loaded at startup that the first screen doesn't need:
projectBrief.ts) took its arrival hash fromappPlaceLinks.ts, which reads the whole catalog, so the catalog was back at startup after being moved out on Nov 16. The hash helpers now live inapps/web/src/placeArrival.ts(one shared click counter, as before), and the chat's place-link check lives in@threadlines/shared/placeHref. Neither reads the catalog.difflibrary (about 4.3 KB).diffStats.tsimported it forcountTextReplacementStats, which only the server uses, and the library's module state kept it in the web bundle. That function moved to@threadlines/shared/textReplacementStats.Startup closure: 912,236 B to 894,411 B gzip, measured locally. No behavior change.
Checked: fmt, lint, typecheck; unit tests for diffStats, appPlaces, appPlaceLinks, chat markdown, settings, the server's AcpAdapter and the guide; full web browser suite (one layout timing test in an untouched file failed under load and passed alone). GPT-6.2 Astra reviewed the diff and found no problems.