Skip to content

[Transition Tracing] Code Cleanup#24880

Merged
lunaruan merged 2 commits into
react:mainfrom
lunaruan:refactor_callbacks
Jul 12, 2022
Merged

[Transition Tracing] Code Cleanup#24880
lunaruan merged 2 commits into
react:mainfrom
lunaruan:refactor_callbacks

Conversation

@lunaruan

@lunaruan lunaruan commented Jul 8, 2022

Copy link
Copy Markdown
Contributor

This PR cleans up some of the transition tracing code by:

  • Looping through marker transitions only when we process the markerComplete callback (rather than in the commit phase) so we block for less time during commit.
  • Renaming PendingSuspenseBoundaries to pendingBoundaries
  • Cleaning up the callback functions

@lunaruan
lunaruan requested a review from acdlite July 8, 2022 19:46
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jul 8, 2022
@sizebot

sizebot commented Jul 8, 2022

Copy link
Copy Markdown

Comparing: 5e8c196...8ed3491

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 = 133.08 kB 133.08 kB = 42.71 kB 42.71 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 138.35 kB 138.35 kB = 44.27 kB 44.27 kB
facebook-www/ReactDOM-prod.classic.js = 468.15 kB 468.06 kB +0.03% 84.40 kB 84.43 kB
facebook-www/ReactDOM-prod.modern.js = 453.39 kB 453.30 kB +0.03% 82.16 kB 82.19 kB
facebook-www/ReactDOMForked-prod.classic.js = 468.15 kB 468.06 kB +0.03% 84.41 kB 84.43 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 8ed3491

@lunaruan
lunaruan force-pushed the refactor_callbacks branch from 95ba07b to 8ed3491 Compare July 12, 2022 19:10
@lunaruan
lunaruan merged commit fa20b31 into react:main Jul 12, 2022
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Sep 8, 2022
Summary:
This sync includes the following changes:
- **[4ea064e](react/react@4ea064eb0 )**: Don't fire passive effects during initial mount of a hidden Offscreen tree ([#24967](react/react#24967)) //<Andrew Clark>//
- **[2c7dea7](react/react@2c7dea736 )**: Implement Offscreen in Fizz ([#24988](react/react#24988)) //<Andrew Clark>//
- **[49f8254](react/react@49f8254d6 )**: Bug fix for <App /> vs. <Counter /> ([#24972](react/react#24972)) //<davidrenne>//
- **[6b28bc9](react/react@6b28bc9c5 )**: test: Throw custom error instead of relying on runtime error ([#24946](react/react#24946)) //<Sebastian Silbermann>//
- **[9bd0dd4](react/react@9bd0dd4c1 )**: test(react-debug-tools): Improve coverage of currentDispatcher.current setter ([#24945](react/react#24945)) //<Sebastian Silbermann>//
- **[59bc52a](react/react@59bc52a16 )**: Add 4.5.0 release to eslint rules CHANGELOG ([#24853](react/react#24853)) //<Sebastian Silbermann>//
- **[cfb6cfa](react/react@cfb6cfa25 )**: Reused components commit with timing as new ones //<Andrew Clark>//
- **[679eea3](react/react@679eea328 )**: Extract layout effects to separate functions //<Andrew Clark>//
- **[41287d4](react/react@41287d447 )**: Use recursion to traverse during "reappear layout" phase //<Andrew Clark>//
- **[697702b](react/react@697702bf3 )**: Use recursion to traverse during "disappear layout" phase //<Andrew Clark>//
- **[0220609](react/react@02206099a )**: Use recursion to traverse during passive unmount phase ([#24918](react/react#24918)) //<Andrew Clark>//
- **[f629495](react/react@f62949519 )**: [Transition Tracing] Rename transitionCallbacks to unstable_transitionCallbacks  ([#24920](react/react#24920)) //<Luna Ruan>//
- **[7a4336c](react/react@7a4336c40 )**: Use recursion to traverse during passive mount phase //<Andrew Clark>//
- **[bb1357b](react/react@bb1357b38 )**: Wrap try-catch directly around each user function //<Andrew Clark>//
- **[de3c069](react/react@de3c06984 )**: Move flag check into each switch case //<Andrew Clark>//
- **[f5916d1](react/react@f5916d15b )**: [Transition Tracing][Code Cleanup] Delete Marker Name Change Tests ([#24908](react/react#24908)) //<Luna Ruan>//
- **[fa20b31](react/react@fa20b319f )**: [Transition Tracing] Code Cleanup ([#24880](react/react#24880)) //<Luna Ruan>//
- **[5e8c196](react/react@5e8c1961c )**: [Transition Tracing] onMarkerProgress ([#24861](react/react#24861)) //<Luna Ruan>//
- **[b641d02](react/react@b641d0209 )**: Use recursion to traverse during layout phase //<Andrew Clark>//
- **[a1b1e39](react/react@a1b1e391e )**: Wrap try-catch directly around each user function //<Andrew Clark>//
- **[3df7e8f](react/react@3df7e8f5d )**: Move flag check into each switch case //<Andrew Clark>//
- **[b8c96b1](react/react@b8c96b136 )**: Move ref commit effects inside switch statement //<Andrew Clark>//
- **[e225fa4](react/react@e225fa43a )**: [Transition Tracing] Don't call transition callbacks if no transition name specified ([#24887](react/react#24887)) //<Luna Ruan>//
- **[dd2d652](react/react@dd2d65227 )**: [Transition Tracing] Tracing Marker Name Change in Update Warning ([#24873](react/react#24873)) //<Luna Ruan>//
- **[80208e7](react/react@80208e769 )**: [Transition Tracing] Add onTransitionProgress Callback ([#24833](react/react#24833)) //<Luna Ruan>//
- **[30eb267](react/react@30eb267ab )**: Land forked reconciler changes ([#24878](react/react#24878)) //<Andrew Clark>//
- **[5e4e2da](react/react@5e4e2dae0 )**: Defer setState callbacks until component is visible ([#24872](react/react#24872)) //<Andrew Clark>//
- **[8e35b50](react/react@8e35b5060 )**: [Transition Tracing] Refactor Code to Remove OffscreeInstance TODOs ([#24855](react/react#24855)) //<Luna Ruan>//
- **[deab126](react/react@deab1263a )**: [Transition Tracing] Change Transition Type Passed Pending Transitions ([#24856](react/react#24856)) //<Luna Ruan>//
- **[82e9e99](react/react@82e9e9909 )**: Suspending inside a hidden tree should not cause fallbacks to appear ([#24699](react/react#24699)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions c1f5884...4ea064e

jest_e2e[run_all_tests]

Reviewed By: philIip, NickGerleman

Differential Revision: D39305648

fbshipit-source-id: 627ead5035c77fbc902b306e17897e425ad7fb99
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
This PR cleans up some of the transition tracing code by:
* Looping through marker transitions only when we process the markerComplete callback (rather than in the commit phase) so we block for less time during commit.
* Renaming `PendingSuspenseBoundaries` to `pendingBoundaries`
* Cleaning up the callback functions
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