[wip] optimizations for compat#2742
Merged
Merged
Conversation
|
Size Change: -742 B (1%) Total Size: 40 kB
ℹ️ View Unchanged
|
…bump from `className` and instead uses object property order.
… which fires continuous change events for range inputs.
JoviDeCroock
approved these changes
Sep 6, 2020
developit
added a commit
that referenced
this pull request
Sep 11, 2020
Signed-off-by: Jason Miller <developit@users.noreply.github.com>
Member
Author
|
@JoviDeCroock since we merge the backport of this to master, I think it might be best to also merge this PR to v11 now. |
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.
This reduces vnode normalization to a single loop over
propswith no megamorphic property access and no shape mutations caused bydelete. These don't show up in our CI benchmarks because they're only in compat.Here's the demo+details for the
UNSAFE_prefix change any why it works:https://codesandbox.io/s/preact-x-react-table-6103-forked-4q3l8?file=/src/patch.js:185-307
This PR also fixes #1989 - instead of using
onchangeas-is for<input type=range>, it usesoninputin all browsers except IE11 (which fires continuousonchangefor range inputs, the original bug).I've incorporated the relevant bits from #2665 as well (everything outside of
src/render.js).It might be worth backporting the prop+event normalization stuff from this into v10 - it's pretty safe, and around 150b savings along with the performance boost.