-
-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(jsx/dom): improve performance (#3288)
Fixes #3264 * fix(test): fix test name * refactor(jsx/dom): assign type and ref to node object directly. `Object.defineProperties` is too slow * fix(jsx/hooks): `useReducer` returns the same function object no matter how many times it is called. * refactor(jsx/dom): remove redundant property "s", "shadow virtual dom children" is not used * refactor(jsx/dom): use for-loop instead of recursion for findInsertBefore * perf(jsx/dom): improve performance of `getEventSpec` * perf(jsx/dom): improve performance of `toAttributeName` * perf(jsx/dom): for the same event handler, do nothing. * perf(jsx/dom): reduce `container.nodeName` access * perf(jsx/dom): remove `skipProps` and compare `key` with `'children'` directly * perf(jsx/dom): use `for-in` instead of `Object.entries` * perf(jsx/dom): if `defaultProps` does not exist, do not create a new `props` object. * perf(jsx/dom): if `callbacks` is empty, do not call `requestAnimationFrame` * perf(jsx/dom): optimize `build` function * perf(jsx/dom): skip `push` call if target list is empty. * perf(jsx/dom): optimize `apply` function * refactor(jsx/dom): remove unused type import * refactor(jsx/dom): remove redundant code `applyNode` * test(jsx/dom): add tests * refactor(jsx/dom): tweaks `delete node.vR` timing
- Loading branch information
Showing
9 changed files
with
272 additions
and
156 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.