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

[WIP] Unify default lane with sync lane #25438

Closed
wants to merge 9 commits into from
Closed

Conversation

tyao1
Copy link
Contributor

@tyao1 tyao1 commented Oct 5, 2022

Summary

We want to unify DefaultLane, SyncLane, and ContinuousLane into just SyncLane, and use a separate field on the root to track whether they should be scheduled with queueMicrotask, requestAnimationFrame, or completely synchronously (in the case of flushSync).
This PR is for unifying DefaultLane and SyncLane.

The main change is that EventPriorities no longer strictly maps to Lane. Instead, it also contains extra bits for UpdateType, so that we can distinguish DefaultUpdate from DiscreteUpdate since now they both are on the sync lane.

TODO:

  • Still a lot of test failure need to figure out

How did you test this change?

@tyao1 tyao1 requested a review from acdlite October 5, 2022 23:57
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Oct 5, 2022
@sizebot
Copy link

sizebot commented Oct 6, 2022

Comparing: cb5084d...0f13a3b

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.30% 135.28 kB 135.69 kB +0.28% 43.39 kB 43.51 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.79% 142.74 kB 143.87 kB +0.72% 45.58 kB 45.91 kB
facebook-www/ReactDOM-prod.classic.js +0.70% 490.70 kB 494.12 kB +0.75% 87.32 kB 87.98 kB
facebook-www/ReactDOM-prod.modern.js +0.73% 475.99 kB 479.45 kB +0.85% 85.13 kB 85.85 kB
facebook-www/ReactDOMForked-prod.classic.js +0.70% 490.70 kB 494.12 kB +0.75% 87.32 kB 87.98 kB
oss-experimental/jest-react/cjs/jest-react.production.min.js +6.77% 2.42 kB 2.59 kB +3.42% 1.17 kB 1.21 kB
oss-stable-semver/jest-react/cjs/jest-react.production.min.js +6.77% 2.42 kB 2.59 kB +3.42% 1.17 kB 1.21 kB
oss-stable/jest-react/cjs/jest-react.production.min.js +6.77% 2.42 kB 2.59 kB +3.42% 1.17 kB 1.21 kB
oss-experimental/react-reconciler/cjs/react-reconciler-constants.development.js +3.71% 1.05 kB 1.09 kB +9.11% 0.44 kB 0.48 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-constants.development.js +3.71% 1.05 kB 1.09 kB +9.11% 0.44 kB 0.48 kB
oss-stable/react-reconciler/cjs/react-reconciler-constants.development.js +3.71% 1.05 kB 1.09 kB +9.11% 0.44 kB 0.48 kB
oss-experimental/jest-react/cjs/jest-react.development.js +2.61% 10.61 kB 10.89 kB +1.49% 3.75 kB 3.80 kB
oss-stable-semver/jest-react/cjs/jest-react.development.js +2.61% 10.61 kB 10.89 kB +1.49% 3.75 kB 3.80 kB
oss-stable/jest-react/cjs/jest-react.development.js +2.61% 10.61 kB 10.89 kB +1.49% 3.75 kB 3.80 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/jest-react/cjs/jest-react.production.min.js +6.77% 2.42 kB 2.59 kB +3.42% 1.17 kB 1.21 kB
oss-stable-semver/jest-react/cjs/jest-react.production.min.js +6.77% 2.42 kB 2.59 kB +3.42% 1.17 kB 1.21 kB
oss-stable/jest-react/cjs/jest-react.production.min.js +6.77% 2.42 kB 2.59 kB +3.42% 1.17 kB 1.21 kB
oss-experimental/react-reconciler/cjs/react-reconciler-constants.development.js +3.71% 1.05 kB 1.09 kB +9.11% 0.44 kB 0.48 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-constants.development.js +3.71% 1.05 kB 1.09 kB +9.11% 0.44 kB 0.48 kB
oss-stable/react-reconciler/cjs/react-reconciler-constants.development.js +3.71% 1.05 kB 1.09 kB +9.11% 0.44 kB 0.48 kB
oss-experimental/jest-react/cjs/jest-react.development.js +2.61% 10.61 kB 10.89 kB +1.49% 3.75 kB 3.80 kB
oss-stable-semver/jest-react/cjs/jest-react.development.js +2.61% 10.61 kB 10.89 kB +1.49% 3.75 kB 3.80 kB
oss-stable/jest-react/cjs/jest-react.development.js +2.61% 10.61 kB 10.89 kB +1.49% 3.75 kB 3.80 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.79% 142.74 kB 143.87 kB +0.72% 45.58 kB 45.91 kB
facebook-www/ReactIs-dev.modern.js +0.78% 9.62 kB 9.70 kB +0.47% 2.54 kB 2.55 kB
facebook-www/ReactIs-dev.classic.js +0.78% 9.62 kB 9.70 kB +0.47% 2.54 kB 2.55 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.min.js +0.77% 146.09 kB 147.22 kB +0.74% 46.98 kB 47.33 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js +0.73% 152.22 kB 153.33 kB +0.67% 47.97 kB 48.29 kB
facebook-www/ReactDOM-prod.modern.js +0.73% 475.99 kB 479.45 kB +0.85% 85.13 kB 85.85 kB
facebook-www/ReactDOMForked-prod.modern.js +0.73% 475.99 kB 479.45 kB +0.85% 85.13 kB 85.86 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.production.min.js +0.72% 12.43 kB 12.52 kB +0.51% 3.72 kB 3.74 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.production.min.js +0.72% 12.43 kB 12.52 kB +0.51% 3.72 kB 3.74 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.production.min.js +0.72% 12.43 kB 12.52 kB +0.51% 3.72 kB 3.74 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +0.72% 12.50 kB 12.59 kB +0.48% 3.74 kB 3.75 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +0.72% 12.50 kB 12.59 kB +0.48% 3.74 kB 3.75 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +0.72% 12.50 kB 12.59 kB +0.48% 3.74 kB 3.75 kB
facebook-www/ReactDOM-profiling.modern.js +0.70% 505.81 kB 509.35 kB +0.79% 89.66 kB 90.36 kB
facebook-www/ReactDOMForked-profiling.modern.js +0.70% 505.81 kB 509.35 kB +0.79% 89.66 kB 90.37 kB
facebook-www/ReactDOM-prod.classic.js +0.70% 490.70 kB 494.12 kB +0.75% 87.32 kB 87.98 kB
facebook-www/ReactDOMForked-prod.classic.js +0.70% 490.70 kB 494.12 kB +0.75% 87.32 kB 87.98 kB
oss-experimental/react-dom/umd/react-dom.production.min.js +0.69% 142.78 kB 143.77 kB +0.78% 46.25 kB 46.62 kB
facebook-www/ReactDOM-profiling.classic.js +0.67% 520.58 kB 524.08 kB +0.71% 91.90 kB 92.55 kB
facebook-www/ReactDOMForked-profiling.classic.js +0.67% 520.58 kB 524.08 kB +0.71% 91.90 kB 92.56 kB
oss-experimental/react-dom/umd/react-dom.profiling.min.js +0.64% 151.59 kB 152.56 kB +0.77% 48.54 kB 48.91 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js +0.62% 103.27 kB 103.91 kB +0.63% 31.64 kB 31.84 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js +0.55% 112.12 kB 112.74 kB +0.55% 33.73 kB 33.92 kB
facebook-www/ReactART-prod.modern.js +0.47% 317.11 kB 318.61 kB +0.61% 54.25 kB 54.58 kB
oss-stable-semver/react-art/cjs/react-art.production.min.js +0.45% 85.12 kB 85.51 kB +0.46% 26.46 kB 26.58 kB
oss-stable/react-art/cjs/react-art.production.min.js +0.45% 85.15 kB 85.53 kB +0.46% 26.46 kB 26.58 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.production.min.js +0.45% 96.44 kB 96.88 kB +0.52% 29.65 kB 29.80 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js +0.45% 96.47 kB 96.90 kB +0.52% 29.67 kB 29.83 kB
facebook-www/ReactART-prod.classic.js +0.45% 327.88 kB 329.34 kB +0.56% 56.05 kB 56.37 kB
facebook-www/ReactART-dev.modern.js +0.45% 846.03 kB 849.81 kB +0.45% 178.74 kB 179.55 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js +0.45% 280.47 kB 281.72 kB +0.51% 49.71 kB 49.96 kB
facebook-www/ReactART-dev.classic.js +0.44% 856.25 kB 860.03 kB +0.43% 180.81 kB 181.60 kB
oss-experimental/react-art/cjs/react-art.production.min.js +0.42% 91.63 kB 92.02 kB +0.46% 28.23 kB 28.36 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +0.42% 296.05 kB 297.30 kB +0.49% 52.06 kB 52.32 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.production.min.js +0.41% 92.41 kB 92.79 kB +0.41% 28.50 kB 28.62 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.min.js +0.41% 92.43 kB 92.82 kB +0.41% 28.50 kB 28.62 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.production.min.js +0.41% 92.66 kB 93.04 kB +0.43% 28.98 kB 29.10 kB
oss-stable/react-test-renderer/umd/react-test-renderer.production.min.js +0.41% 92.69 kB 93.06 kB +0.43% 28.98 kB 29.10 kB
facebook-www/ReactDOMForked-dev.modern.js +0.40% 1,220.05 kB 1,224.94 kB +0.40% 267.31 kB 268.36 kB
facebook-www/ReactDOM-dev.modern.js +0.40% 1,220.05 kB 1,224.94 kB +0.40% 267.31 kB 268.37 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.min.js +0.40% 97.15 kB 97.54 kB +0.46% 29.83 kB 29.96 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.production.min.js +0.39% 97.39 kB 97.78 kB +0.42% 30.24 kB 30.36 kB
facebook-www/ReactDOMForked-dev.classic.js +0.39% 1,243.68 kB 1,248.57 kB +0.39% 271.60 kB 272.65 kB
facebook-www/ReactDOM-dev.classic.js +0.39% 1,243.68 kB 1,248.57 kB +0.39% 271.60 kB 272.65 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.profiling.min.js +0.39% 105.27 kB 105.68 kB +0.44% 31.85 kB 31.99 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js +0.39% 105.30 kB 105.71 kB +0.44% 31.88 kB 32.02 kB
react-native/implementations/ReactNativeRenderer-prod.js +0.39% 315.37 kB 316.59 kB +0.44% 55.76 kB 56.01 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.development.js +0.38% 1,088.10 kB 1,092.27 kB +0.37% 243.43 kB 244.33 kB
react-native/implementations/ReactFabric-prod.js +0.38% 308.59 kB 309.78 kB +0.42% 54.68 kB 54.91 kB
oss-experimental/react-dom/cjs/react-dom.development.js +0.38% 1,105.05 kB 1,109.22 kB +0.36% 247.05 kB 247.94 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +0.38% 323.71 kB 324.93 kB +0.43% 57.42 kB 57.67 kB
react-native/implementations/ReactFabric-prod.fb.js +0.37% 316.95 kB 318.13 kB +0.40% 56.33 kB 56.56 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js +0.37% 820.84 kB 823.88 kB +0.34% 174.57 kB 175.16 kB
oss-experimental/react-dom/umd/react-dom.development.js +0.37% 1,159.13 kB 1,163.42 kB +0.36% 249.79 kB 250.68 kB
react-native/implementations/ReactNativeRenderer-profiling.js +0.36% 334.54 kB 335.76 kB +0.43% 58.87 kB 59.13 kB
react-native/implementations/ReactFabric-profiling.js +0.36% 327.68 kB 328.86 kB +0.40% 57.81 kB 58.05 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.development.js +0.34% 34.60 kB 34.72 kB +0.33% 7.80 kB 7.83 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.development.js +0.34% 34.60 kB 34.72 kB +0.33% 7.80 kB 7.83 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.development.js +0.34% 34.60 kB 34.72 kB +0.33% 7.80 kB 7.83 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +0.34% 350.45 kB 351.64 kB +0.42% 61.54 kB 61.80 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.34% 34.73 kB 34.85 kB +0.33% 7.82 kB 7.84 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.34% 34.73 kB 34.85 kB +0.33% 7.82 kB 7.84 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.34% 34.73 kB 34.85 kB +0.33% 7.82 kB 7.84 kB
react-native/implementations/ReactFabric-profiling.fb.js +0.33% 343.60 kB 344.75 kB +0.40% 60.46 kB 60.70 kB
facebook-www/ReactDOMTesting-prod.modern.js +0.33% 437.44 kB 438.87 kB +0.38% 80.71 kB 81.02 kB
oss-stable-semver/react-art/umd/react-art.production.min.js +0.31% 121.01 kB 121.39 kB +0.35% 37.65 kB 37.78 kB
oss-stable/react-art/umd/react-art.production.min.js +0.31% 121.03 kB 121.41 kB +0.35% 37.65 kB 37.78 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.development.js +0.31% 779.38 kB 781.82 kB +0.33% 166.39 kB 166.93 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js +0.31% 779.40 kB 781.84 kB +0.33% 166.41 kB 166.96 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.development.js +0.31% 687.90 kB 690.03 kB +0.33% 149.45 kB 149.93 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.development.js +0.31% 687.92 kB 690.05 kB +0.33% 149.47 kB 149.96 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.development.js +0.31% 720.55 kB 722.78 kB +0.33% 151.04 kB 151.54 kB
oss-stable/react-test-renderer/umd/react-test-renderer.development.js +0.31% 720.57 kB 722.80 kB +0.33% 151.07 kB 151.57 kB
facebook-www/ReactDOMTesting-prod.classic.js +0.30% 453.43 kB 454.81 kB +0.37% 83.11 kB 83.42 kB
oss-stable-semver/react-dom/cjs/react-dom.production.min.js +0.30% 135.25 kB 135.66 kB +0.28% 43.39 kB 43.51 kB
oss-stable/react-dom/cjs/react-dom.production.min.js +0.30% 135.28 kB 135.69 kB +0.28% 43.39 kB 43.51 kB
oss-experimental/react-art/umd/react-art.production.min.js +0.30% 127.48 kB 127.86 kB +0.34% 39.56 kB 39.69 kB
oss-stable-semver/react-dom/umd/react-dom.production.min.js +0.30% 135.38 kB 135.78 kB +0.36% 44.08 kB 44.24 kB
oss-stable/react-dom/umd/react-dom.production.min.js +0.30% 135.40 kB 135.80 kB +0.36% 44.08 kB 44.24 kB
oss-stable-semver/react-art/cjs/react-art.development.js +0.29% 712.67 kB 714.74 kB +0.30% 154.28 kB 154.75 kB
oss-stable/react-art/cjs/react-art.development.js +0.29% 712.69 kB 714.76 kB +0.30% 154.30 kB 154.77 kB
facebook-www/ReactTestRenderer-dev.modern.js +0.28% 750.52 kB 752.62 kB +0.28% 160.77 kB 161.23 kB
facebook-www/ReactTestRenderer-dev.classic.js +0.28% 750.52 kB 752.62 kB +0.28% 160.77 kB 161.23 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js +0.28% 730.88 kB 732.91 kB +0.29% 156.71 kB 157.17 kB
react-native/implementations/ReactFabric-dev.js +0.28% 808.72 kB 810.96 kB +0.30% 175.57 kB 176.08 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.development.js +0.28% 716.77 kB 718.75 kB +0.28% 155.14 kB 155.57 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.development.js +0.28% 750.87 kB 752.94 kB +0.29% 156.79 kB 157.24 kB
react-native/implementations/ReactNativeRenderer-dev.js +0.27% 818.32 kB 820.56 kB +0.31% 178.13 kB 178.68 kB
oss-stable-semver/react-dom/cjs/react-dom.profiling.min.js +0.27% 144.73 kB 145.12 kB +0.32% 45.77 kB 45.92 kB
oss-stable/react-dom/cjs/react-dom.profiling.min.js +0.27% 144.76 kB 145.14 kB +0.32% 45.77 kB 45.92 kB
oss-stable-semver/react-art/umd/react-art.development.js +0.26% 817.33 kB 819.49 kB +0.28% 172.39 kB 172.88 kB
oss-stable/react-art/umd/react-art.development.js +0.26% 817.36 kB 819.51 kB +0.28% 172.41 kB 172.90 kB
oss-stable-semver/react-dom/umd/react-dom.profiling.min.js +0.26% 144.18 kB 144.56 kB +0.27% 46.34 kB 46.47 kB
oss-stable/react-dom/umd/react-dom.profiling.min.js +0.26% 144.21 kB 144.59 kB +0.27% 46.34 kB 46.47 kB
react-native/implementations/ReactFabric-dev.fb.js +0.26% 843.60 kB 845.79 kB +0.28% 182.13 kB 182.64 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js +0.26% 853.19 kB 855.38 kB +0.28% 184.72 kB 185.24 kB
oss-experimental/react-art/cjs/react-art.development.js +0.26% 753.12 kB 755.04 kB +0.26% 162.39 kB 162.81 kB
oss-experimental/react-art/umd/react-art.development.js +0.23% 859.87 kB 861.87 kB +0.25% 180.49 kB 180.94 kB
oss-stable-semver/react-dom/cjs/react-dom.development.js +0.20% 1,060.36 kB 1,062.49 kB +0.21% 237.85 kB 238.34 kB
oss-stable/react-dom/cjs/react-dom.development.js +0.20% 1,060.38 kB 1,062.52 kB +0.21% 237.87 kB 238.37 kB
oss-experimental/react-reconciler/cjs/react-reconciler-constants.production.min.js = 0.45 kB 0.45 kB = 0.29 kB 0.29 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-constants.production.min.js = 0.45 kB 0.45 kB = 0.29 kB 0.29 kB
oss-stable/react-reconciler/cjs/react-reconciler-constants.production.min.js = 0.45 kB 0.45 kB = 0.29 kB 0.29 kB

Generated by 🚫 dangerJS against 0f13a3b

@tyao1
Copy link
Contributor Author

tyao1 commented Oct 20, 2022

updated branch in #25524

@tyao1 tyao1 closed this Oct 20, 2022
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