Repository navigation
fix(runtime): dedupe DOMElements set literal (286 entries, 149 unique) - #543
Merged
Merged
Conversation
The array concatenated a categorized list with a full alphabetical list; membership is unchanged (sha256 of sorted unique members identical before and after). Saves ~1KB minified wherever the set is retained. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
🦋 Changeset detectedLatest commit: 18d3380 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Smaller than the deduped array literal (1180->893 min, 571->536 gz) with the same Set<string> public surface. Both the Set construction AND the inner .split() carry /*#__PURE__*/ — without the inner annotation, bundlers cannot prove the argument expression pure and retain the whole declaration even when unused (verified with esbuild). Other constant sets measured and left as array literals: across all six the same encoding saves 252 min bytes and exactly 1 gzip byte total, with the small sets regressing (the .split wrapper outweighs the quotes). Co-Authored-By: Claude Fable 5 <[email protected]>
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
DOMElementsarray concatenated a categorized list with a full alphabetical list, shipping 286 entries where only 149 are unique — ~1,056 bytes minified (266 gzip) in any bundle that retains the set (star-import, CDN, non-tree-shaken consumers; tree-shaken apps already drop it via the/*#__PURE__*/annotation).Membership is provably unchanged: sha256 of the sorted unique member list is identical before and after (
7ff448dbd2015bd9), and consumers only ever call.has()— verified no iteration/spread of the set anywhere in this repo or solid.Part of the solidjs/solid#2883 size work (phase 2).
All 569 runtime tests pass.
🤖 Generated with Claude Code