Repository navigation
perf: optimize library selection, filtering, and virtual scrolling - #535
Merged
Merged
Conversation
|
🎉 This pull request is included in version 5.2.3 📦 |
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
Reduce repeated selection, filtering, rendering, and event-binding work in
multiple-select-vanilla. Fix listener cleanup and virtual-scroller lifecycle issues identified during the library LOC/performance audit.Why
Large option lists repeatedly scanned selection values, rebuilt unchanged row descriptions, decoded labels, and rebound stable controls.
Recorded local diagnostic results:
Timing results are single instrumented local probes using unminified bundles, not repeated production benchmarks.
Changes
.agents/audits.The final guard simplification reduces
rebindControlschecks from 12 to 2 and avoids creating an unused handler during virtual-scroll updates.Validation
git diff --check: passed.The latest browser run used a separate artifact directory after the initial run encountered missing trace files while a Playwright UI session used the default directory.
Comments
Performance and lifecycle fixes add some implementation state:
The final simplification alone removes 29 minified bytes and 10 gzip bytes; physical LOC is unchanged.
Public exports remain unchanged. Existing custom styling, sanitization, mutable-data handling, selection coercion, and callback ordering are preserved. No migration is required.
Changes are scoped to the library, its regression coverage, and audit documentation. Timing probes were not repeated after the final guard simplification; bundle measurements and browser validation were repeated.
AI / LLM assistance
Checklist