Skip to content

Commit

Permalink
Use already extracted values instead of reading off props for control…
Browse files Browse the repository at this point in the history
…led components (#26596)

Since `props.x` is a possibly megamorphic access, it can be slow to
access and trigger recompilation.

When we are looping over the props and pattern matching every key,
anyway, we've already done this work. We can just reuse the same value
by stashing it outside the loop in the stack.

This only makes sense for updates in diffInCommitPhase since otherwise
we don't have the full set of props in that loop.

We also have to be careful not to skip over equal values since we need
to extract them anyway.
  • Loading branch information
sebmarkbage authored Apr 11, 2023
1 parent 343a45f commit 6b90976
Show file tree
Hide file tree
Showing 4 changed files with 378 additions and 154 deletions.
Loading

0 comments on commit 6b90976

Please sign in to comment.