Release - v2.3.5#3040
Merged
dead-claudia merged 2 commits intoreleasefrom Aug 25, 2025
Merged
Conversation
Bumps the normal group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: normal ... Signed-off-by: dependabot[bot] <support@github.com>
* hyperscriptVnode: use spread syntax The implementation adopts spread syntax, inspired by the approach mentioned in the comments. However, argument handling has been adjusted for better performance. Using spread syntax not only allows related comments to be deleted, but also slightly reduces bundle size and improves benchmarks by several percent. All existing tests pass successfully. Note that spread syntax does not seem to be supported by the existing internal bundler in some cases, so the bundler has also been updated to prevent incorrect suffix handling. * allow attrs to be undefined and execute early return in `execSelector()` Since commit f9e5163, attrs is never null/undefined. However, `m.render()` takes into account the case where attrs is null/undefined, and it is better to use undefined from a performance point of view. Also, early return within `execSelector()` contributes to further performance improvement. Some tests are changed because of the null/undefined attrs. This commit may be breaking from this point of view, but the v2.0.4 era allows for attrs to be null/undefined and the impact will be quite small. * use the cached attrs as-is and skip `updateAttrs()` if the static attrs are identical Since `compileSelector()` generates attrs objects containing only strings (no functions or nested objects). So, `updateAttrs()` can safely be skipped by checking the equality of the cached attrs objects themselves if the objects do not contain form attributes. If you mainly use the "static" attrs and do not use dynamic attrs, skipping `updateAttrs()` allows significant performance improvements. Also, the added checks are lightweight and there appears to be little or no performance degradation due to these checks. This commit itself is not a breaking change in the sense that it passes all existing tests. The checks in `m.render()` above and the form attribute checks in `compileSelector()` result in a minor increase in code volume, though. * refactor execSelector() This state.attrs.className != null check is redundant. * README: drop IE11 support It seems that the current codebase (including generator, dom-for and spread syntax) already has little support for IE11 because it requires transpiling as well as polyfills. * prevents existing tests from being changed As this results in a slight decrease in performance improvement, comments regarding potential performance improvements have also been added. * use a common empty attrs object This simplifies the processing within execSelector. * cachedAttrsIsStaticMap: use WeakMap to avoid potential memory leaks * hyperscriptVnode: add performance sensitivity comments * cachedAttrsIsStaticMap: revert back to Map from WeakMap with comments * pass emptyAttrs to the Map constructor This slightly reduces the bundle size.
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.
Release v2.3.5
Changelog
Patch Changes
Assorted Performance Improvements (@kfule)
This PR improves performance through the following changes: Adoption of the spread syntax, which can be optimized in modern browsers.
Bump actions/checkout from 4 to 5 in the normal group (@dependabot[bot])
Bumps the normal group with 1 update: actions/checkout. Updates
actions/checkoutfrom 4 to 5. Release notes.