Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transition Tracing] Add pendingPassiveTransitions #24320

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

lunaruan
Copy link
Contributor

@lunaruan lunaruan commented Apr 8, 2022

Add pendingPassiveTransitions work loop module level variable. Because workInProgressTransitions might change before we process it in the passive effects, we introduce a new variable, pendingPassiveTransitions, where we store the transitions until we can actually process them in the commit phase.

@lunaruan lunaruan requested a review from acdlite April 8, 2022 21:48
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 8, 2022
@sizebot
Copy link

sizebot commented Apr 8, 2022

Comparing: 8dcedba...78a1f13

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js +0.04% 131.40 kB 131.45 kB +0.02% 41.98 kB 41.99 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.04% 136.66 kB 136.71 kB +0.03% 43.51 kB 43.52 kB
facebook-www/ReactDOM-prod.classic.js +0.17% 433.62 kB 434.37 kB +0.12% 79.74 kB 79.84 kB
facebook-www/ReactDOM-prod.modern.js +0.18% 418.62 kB 419.37 kB +0.12% 77.38 kB 77.48 kB
facebook-www/ReactDOMForked-prod.classic.js +0.17% 433.62 kB 434.37 kB +0.12% 79.75 kB 79.84 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js +0.30% 248.14 kB 248.88 kB +0.19% 45.40 kB 45.49 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +0.28% 262.93 kB 263.67 kB +0.22% 47.74 kB 47.85 kB
facebook-www/ReactART-prod.modern.js +0.28% 267.75 kB 268.50 kB +0.19% 47.73 kB 47.82 kB
react-native/implementations/ReactFabric-prod.js +0.27% 277.47 kB 278.21 kB +0.24% 50.12 kB 50.24 kB
facebook-www/ReactART-prod.classic.js +0.27% 278.54 kB 279.28 kB +0.19% 49.53 kB 49.62 kB
react-native/implementations/ReactNativeRenderer-prod.js +0.26% 284.08 kB 284.82 kB +0.19% 51.31 kB 51.40 kB
react-native/implementations/ReactFabric-prod.fb.js +0.26% 290.22 kB 290.96 kB +0.23% 52.55 kB 52.67 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js +0.26% 655.19 kB 656.86 kB +0.23% 141.88 kB 142.20 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +0.25% 292.21 kB 292.95 kB +0.18% 53.00 kB 53.10 kB
react-native/implementations/ReactFabric-profiling.js +0.25% 296.44 kB 297.18 kB +0.18% 53.39 kB 53.49 kB
facebook-www/ReactTestRenderer-dev.classic.js +0.25% 676.61 kB 678.29 kB +0.23% 145.82 kB 146.16 kB
facebook-www/ReactTestRenderer-dev.modern.js +0.25% 676.63 kB 678.30 kB +0.23% 145.83 kB 146.17 kB
react-native/implementations/ReactNativeRenderer-profiling.js +0.24% 303.09 kB 303.83 kB +0.18% 54.49 kB 54.58 kB
react-native/implementations/ReactFabric-profiling.fb.js +0.23% 317.19 kB 317.93 kB +0.19% 56.83 kB 56.94 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +0.23% 319.07 kB 319.81 kB +0.18% 57.17 kB 57.27 kB
react-native/implementations/ReactFabric-dev.js +0.23% 736.94 kB 738.61 kB +0.22% 161.76 kB 162.11 kB
react-native/implementations/ReactNativeRenderer-dev.js +0.22% 745.42 kB 747.09 kB +0.23% 163.52 kB 163.90 kB
facebook-www/ReactART-dev.modern.js +0.22% 755.64 kB 757.32 kB +0.21% 161.45 kB 161.79 kB
facebook-www/ReactART-dev.classic.js +0.22% 765.85 kB 767.52 kB +0.21% 163.58 kB 163.92 kB
react-native/implementations/ReactFabric-dev.fb.js +0.21% 781.15 kB 782.82 kB +0.21% 169.95 kB 170.31 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js +0.21% 787.86 kB 789.53 kB +0.20% 171.31 kB 171.65 kB

Generated by 🚫 dangerJS against 78a1f13

@@ -2087,6 +2088,9 @@ function commitRootImpl(
if (!rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = true;
pendingPassiveEffectsRemainingLanes = remainingLanes;
// workInProgressTransitions might be overwritten, so we want
// to store it in pendingPassiveTransitions until they get processed
pendingPassiveTransitions = workInProgressTransitions;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be passed in as an argument to commitRoot similar to recoverableErrors

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because workInProgressTransitions might change before we process it in the passive effects, we introduce a new variable, pendingPassiveTransitions

This is true but it's also true that it might change in between the commit phase and the render phase, because we sometimes throttle the commit with setTimeout.

@lunaruan lunaruan force-pushed the pending_passive_transitions branch from 372d80d to a645139 Compare April 8, 2022 22:33
@lunaruan lunaruan force-pushed the pending_passive_transitions branch from a645139 to 78a1f13 Compare April 8, 2022 23:02
@lunaruan lunaruan merged commit b0f13e5 into facebook:main Apr 8, 2022
rickhanlonii pushed a commit that referenced this pull request Apr 13, 2022
Add pendingPassiveTransitions work loop module level variable. Because workInProgressTransitions might change before we process it in the passive effects, we introduce a new variable, pendingPassiveTransitions, where we store the transitions until we can actually process them in the commit phase.
rickhanlonii pushed a commit that referenced this pull request Apr 14, 2022
Add pendingPassiveTransitions work loop module level variable. Because workInProgressTransitions might change before we process it in the passive effects, we introduce a new variable, pendingPassiveTransitions, where we store the transitions until we can actually process them in the commit phase.
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
Add pendingPassiveTransitions work loop module level variable. Because workInProgressTransitions might change before we process it in the passive effects, we introduce a new variable, pendingPassiveTransitions, where we store the transitions until we can actually process them in the commit phase.
rickhanlonii pushed a commit that referenced this pull request Apr 19, 2022
Add pendingPassiveTransitions work loop module level variable. Because workInProgressTransitions might change before we process it in the passive effects, we introduce a new variable, pendingPassiveTransitions, where we store the transitions until we can actually process them in the commit phase.
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Apr 26, 2022
Summary:
This sync includes the following changes:
- **[bd4784c8f](facebook/react@bd4784c8f )**: Revert #24236 (Don't recreate the same fallback on the client if hydrating suspends) ([#24434](facebook/react#24434)) //<dan>//
- **[6d3b6d0f4](facebook/react@6d3b6d0f4 )**: forwardRef et al shouldn't affect if props reused ([#24421](facebook/react#24421)) //<Andrew Clark>//
- **[bd0813766](facebook/react@bd0813766 )**: Fix: useDeferredValue should reuse previous value ([#24413](facebook/react#24413)) //<Andrew Clark>//
- **[9ae80d6a2](facebook/react@9ae80d6a2 )**: Suppress hydration warnings when a preceding sibling suspends ([#24404](facebook/react#24404)) //<Josh Story>//
- **[0dc4e6663](facebook/react@0dc4e6663 )**: Land enableClientRenderFallbackOnHydrationMismatch ([#24410](facebook/react#24410)) //<Andrew Clark>//
- **[354772952](facebook/react@354772952 )**: Land enableSelectiveHydration flag ([#24406](facebook/react#24406)) //<Andrew Clark>//
- **[392808a1f](facebook/react@392808a1f )**: Land enableClientRenderFallbackOnTextMismatch flag ([#24405](facebook/react#24405)) //<Andrew Clark>//
- **[1e748b452](facebook/react@1e748b452 )**: Land enableLazyElements flag ([#24407](facebook/react#24407)) //<Andrew Clark>//
- **[4175f0593](facebook/react@4175f0593 )**: Temporarily feature flag numeric fallback for symbols ([#24401](facebook/react#24401)) //<Ricky>//
- **[a6d53f346](facebook/react@a6d53f346 )**: Revert "Clean up Selective Hydration / Event Replay flag ([#24156](facebook/react#24156))" ([#24402](facebook/react#24402)) //<Ricky>//
- **[ab9cdd34f](facebook/react@ab9cdd34f )**: Bugfix: In legacy mode, call suspended tree's unmount effects when it is deleted ([#24400](facebook/react#24400)) //<Andrew Clark>//
- **[168da8d55](facebook/react@168da8d55 )**: Fix typo that happened during rebasing //<Andrew Clark>//
- **[8bc527a4c](facebook/react@8bc527a4c )**: Bugfix: Fix race condition between interleaved and non-interleaved updates ([#24353](facebook/react#24353)) //<Andrew Clark>//
- **[f7cf077cc](facebook/react@f7cf077cc )**: [Transition Tracing] Add Offscreen Queue ([#24341](facebook/react#24341)) //<Luna Ruan>//
- **[4fc394bbe](facebook/react@4fc394bbe )**: Fix suspense fallback throttling ([#24253](facebook/react#24253)) //<sunderls>//
- **[80170a068](facebook/react@80170a068 )**: Match bundle.name and match upper case entry points ([#24346](facebook/react#24346)) //<Sebastian Markbåge>//
- **[fea6f8da6](facebook/react@fea6f8da6 )**: [Transition Tracing] Add transition to OffscreenState and pendingSuspenseBoundaries to RootState ([#24340](facebook/react#24340)) //<Luna Ruan>//
- **[8e2f9b086](facebook/react@8e2f9b086 )**: move passive flag ([#24339](facebook/react#24339)) //<Luna Ruan>//
- **[55a21ef7e](facebook/react@55a21ef7e )**: fix pushTransition for transition tracing ([#24338](facebook/react#24338)) //<Luna Ruan>//
- **[069d23bb7](facebook/react@069d23bb7 )**:  [eslint-plugin-exhaustive-deps] Fix exhaustive deps check for unstable vars ([#24343](facebook/react#24343)) //<Afzal Sayed>//
- **[4997515b9](facebook/react@4997515b9 )**: Point useSubscription to useSyncExternalStore shim ([#24289](facebook/react#24289)) //<dan>//
- **[01e2bff1d](facebook/react@01e2bff1d )**: Remove unnecessary check ([#24332](facebook/react#24332)) //<zhoulixiang>//
- **[d9a0f9e20](facebook/react@d9a0f9e20 )**: Delete create-subscription folder ([#24288](facebook/react#24288)) //<dan>//
- **[f993ffc51](facebook/react@f993ffc51 )**: Fix infinite update loop that happens when an unmemoized value is passed to useDeferredValue ([#24247](facebook/react#24247)) //<Andrew Clark>//
- **[fa5800226](facebook/react@fa5800226 )**: [Fizz] Pipeable Stream Perf ([#24291](facebook/react#24291)) //<Josh Story>//
- **[0568c0f8c](facebook/react@0568c0f8c )**: Replace zero with NoLanes for consistency in FiberLane ([#24327](facebook/react#24327)) //<Leo>//
- **[e0160d50c](facebook/react@e0160d50c )**: add transition tracing transitions stack ([#24321](facebook/react#24321)) //<Luna Ruan>//
- **[b0f13e5d3](facebook/react@b0f13e5d3 )**: add pendingPassiveTransitions ([#24320](facebook/react#24320)) //<Luna Ruan>//

Changelog:
[General][Changed] - React Native sync for revisions 60e63b9...bd4784c

jest_e2e[run_all_tests]

Reviewed By: kacieb

Differential Revision: D35899012

fbshipit-source-id: 86a885e336fca9f0efa80cd2b8ca040f2cb53853
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants