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

Replace old Fiber Scheduler with new one #15387

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Apr 11, 2019

The new Fiber Scheduler has been running in Facebook for several days without issues. Let's switch to it.

  • Remove enableNewScheduler feature flag
  • Rename ReactFiberScheduler.new.js to ReactFiberScheduler.js
  • Remove react-dom/unstable-new-scheduler build (and corresponding www build)
  • Delete dead code
    • ReactFiberScheduler.old.js
    • ReactFiberPendingPriority.js, which was only called by the old scheduler
    • Tests that checked enableNewScheduler flag

@acdlite acdlite force-pushed the replace-old-fiber-scheduler branch 2 times, most recently from f4a3569 to c9452ec Compare April 11, 2019 20:26
@sizebot
Copy link

sizebot commented Apr 11, 2019

ReactDOM: size: -1.7%, gzip: -1.4%

Details of bundled changes.

Comparing: cdfb06e...c3af742

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js -10.0% -9.2% 898.51 KB 808.47 KB 203.36 KB 184.73 KB UMD_DEV
react-dom.production.min.js -1.7% -1.4% 105.43 KB 103.64 KB 34.16 KB 33.68 KB UMD_PROD
react-dom.development.js -10.1% -9.2% 893.13 KB 802.95 KB 201.82 KB 183.2 KB NODE_DEV
react-dom.production.min.js -1.7% -1.4% 105.42 KB 103.63 KB 33.61 KB 33.14 KB NODE_PROD
react-dom-test-utils.development.js -0.2% -0.3% 54.29 KB 54.19 KB 15.02 KB 14.98 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.52 KB 10.52 KB 3.89 KB 3.9 KB UMD_PROD
react-dom-test-utils.development.js -0.2% -0.3% 54.01 KB 53.91 KB 14.96 KB 14.91 KB NODE_DEV
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.76 KB 60.76 KB 15.85 KB 15.85 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.69 KB 10.69 KB 3.67 KB 3.67 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.43 KB 60.43 KB 15.72 KB 15.72 KB NODE_DEV
react-dom-server.browser.development.js -0.1% -0.1% 136.83 KB 136.73 KB 35.97 KB 35.92 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.18 KB 19.18 KB 7.21 KB 7.21 KB UMD_PROD
react-dom-server.browser.development.js -0.1% -0.1% 132.96 KB 132.86 KB 35.03 KB 34.99 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.1 KB 19.1 KB 7.2 KB 7.2 KB NODE_PROD
react-dom-server.node.development.js -0.1% -0.1% 134.9 KB 134.8 KB 35.58 KB 35.54 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% 0.0% 19.96 KB 19.96 KB 7.51 KB 7.51 KB NODE_PROD
ReactDOM-dev.js -10.0% -9.4% 919.33 KB 827.07 KB 203.64 KB 184.44 KB FB_WWW_DEV
ReactDOM-prod.js -1.5% -0.4% 341.06 KB 335.8 KB 62.81 KB 62.54 KB FB_WWW_PROD
ReactTestUtils-dev.js -0.4% -0.7% 51.61 KB 51.4 KB 13.93 KB 13.83 KB FB_WWW_DEV
ReactDOMServer-dev.js -0.2% -0.3% 135.16 KB 134.95 KB 34.71 KB 34.61 KB FB_WWW_DEV
react-dom.profiling.min.js -1.5% -0.6% 108.54 KB 106.95 KB 34.19 KB 33.99 KB NODE_PROFILING
ReactDOM-profiling.js -2.0% -1.2% 348.16 KB 341.18 KB 64.27 KB 63.47 KB FB_WWW_PROFILING
react-dom.profiling.min.js -1.5% -0.4% 108.43 KB 106.79 KB 34.78 KB 34.63 KB UMD_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.66 KB 3.66 KB 1.45 KB 1.45 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.21 KB 1.21 KB 705 B 706 B UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.49 KB 3.49 KB 1.41 KB 1.41 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.05 KB 1.05 KB 635 B 637 B NODE_PROD
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 3.74 KB 3.74 KB 1.43 KB 1.43 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.2% 1.1 KB 1.1 KB 666 B 667 B NODE_PROD
react-dom-unstable-fire.development.js -10.0% -9.2% 898.83 KB 808.79 KB 203.5 KB 184.87 KB UMD_DEV
react-dom-unstable-fire.production.min.js -1.7% -1.4% 105.44 KB 103.65 KB 34.17 KB 33.69 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js -1.5% -0.4% 108.45 KB 106.8 KB 34.79 KB 34.64 KB UMD_PROFILING
react-dom-unstable-fire.development.js -10.1% -9.2% 893.46 KB 803.27 KB 201.95 KB 183.33 KB NODE_DEV
react-dom-unstable-fire.production.min.js -1.7% -1.4% 105.43 KB 103.64 KB 33.62 KB 33.15 KB NODE_PROD
react-dom-unstable-fire.profiling.min.js -1.5% -0.6% 108.55 KB 106.97 KB 34.2 KB 34 KB NODE_PROFILING
ReactFire-dev.js -10.0% -9.4% 918.52 KB 826.26 KB 203.69 KB 184.5 KB FB_WWW_DEV
ReactFire-prod.js -1.8% -0.7% 329.72 KB 323.77 KB 60.51 KB 60.09 KB FB_WWW_PROD
ReactFire-profiling.js -2.3% -1.4% 336.77 KB 329.12 KB 61.93 KB 61.05 KB FB_WWW_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js -13.2% -12.5% 641.45 KB 556.46 KB 138.88 KB 121.46 KB UMD_DEV
react-art.production.min.js -1.7% -1.4% 97.15 KB 95.49 KB 29.73 KB 29.31 KB UMD_PROD
react-art.development.js -14.9% -14.4% 572.66 KB 487.49 KB 121.57 KB 104.07 KB NODE_DEV
react-art.production.min.js -2.8% -2.0% 62.18 KB 60.46 KB 19 KB 18.61 KB NODE_PROD
ReactART-dev.js -14.9% -14.9% 583.81 KB 496.65 KB 121.22 KB 103.13 KB FB_WWW_DEV
ReactART-prod.js -2.1% -1.7% 199.02 KB 194.93 KB 33.73 KB 33.15 KB FB_WWW_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -14.7% -14.4% 587.19 KB 500.9 KB 124.77 KB 106.78 KB UMD_DEV
react-test-renderer.production.min.js -2.8% -2.6% 63.47 KB 61.68 KB 19.44 KB 18.93 KB UMD_PROD
react-test-renderer.development.js -14.8% -14.5% 582.82 KB 496.44 KB 123.63 KB 105.68 KB NODE_DEV
react-test-renderer.production.min.js -2.9% -2.3% 63.19 KB 61.36 KB 19.24 KB 18.8 KB NODE_PROD
react-test-renderer-shallow.development.js -0.2% -0.4% 41.98 KB 41.88 KB 10.75 KB 10.7 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 11.63 KB 11.63 KB 3.55 KB 3.55 KB UMD_PROD
react-test-renderer-shallow.development.js -0.3% -0.6% 36.21 KB 36.11 KB 9.41 KB 9.36 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 11.81 KB 11.81 KB 3.67 KB 3.67 KB NODE_PROD
ReactTestRenderer-dev.js -14.8% -14.9% 595.51 KB 507.22 KB 123.87 KB 105.37 KB FB_WWW_DEV
ReactShallowRenderer-dev.js -0.6% -1.2% 35.29 KB 35.08 KB 8.82 KB 8.72 KB FB_WWW_DEV

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js -15.8% -15.4% 575.84 KB 485.02 KB 121.13 KB 102.51 KB NODE_DEV
react-reconciler.production.min.js -2.9% -2.4% 63.2 KB 61.39 KB 18.81 KB 18.35 KB NODE_PROD
react-reconciler-persistent.development.js -15.8% -15.5% 573.65 KB 482.93 KB 120.2 KB 101.62 KB NODE_DEV
react-reconciler-persistent.production.min.js -2.9% -2.4% 63.21 KB 61.4 KB 18.82 KB 18.36 KB NODE_PROD
react-reconciler-reflection.development.js -0.5% -0.8% 19.28 KB 19.18 KB 6.03 KB 5.98 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% 🔺+0.2% 2.43 KB 2.43 KB 1.09 KB 1.09 KB NODE_PROD

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js -0.1% -0.2% 107.38 KB 107.28 KB 27.16 KB 27.11 KB UMD_DEV
react.development.js -0.1% -0.3% 70.14 KB 70.04 KB 18.07 KB 18.02 KB NODE_DEV
react.production.min.js 0.0% 0.0% 6.44 KB 6.44 KB 2.67 KB 2.67 KB NODE_PROD
React-dev.js -0.3% -0.6% 68.53 KB 68.32 KB 17.45 KB 17.35 KB FB_WWW_DEV
React-prod.js 0.0% 0.0% 16.02 KB 16.02 KB 4.24 KB 4.24 KB FB_WWW_PROD
React-profiling.js 0.0% 0.0% 16.02 KB 16.02 KB 4.24 KB 4.24 KB FB_WWW_PROFILING

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -12.4% -12.3% 717.38 KB 628.2 KB 152.03 KB 133.33 KB RN_FB_DEV
ReactNativeRenderer-prod.js -2.1% -1.7% 248.82 KB 243.71 KB 43.06 KB 42.35 KB RN_FB_PROD
ReactNativeRenderer-dev.js -12.4% -12.3% 717.29 KB 628.12 KB 151.99 KB 133.29 KB RN_OSS_DEV
ReactNativeRenderer-prod.js -2.1% -1.7% 248.83 KB 243.72 KB 43.06 KB 42.35 KB RN_OSS_PROD
ReactFabric-dev.js -12.6% -12.5% 706.07 KB 616.89 KB 149.31 KB 130.62 KB RN_FB_DEV
ReactFabric-prod.js -1.9% -1.6% 242.13 KB 237.48 KB 41.76 KB 41.09 KB RN_FB_PROD
ReactFabric-dev.js -12.6% -12.5% 705.98 KB 616.79 KB 149.28 KB 130.59 KB RN_OSS_DEV
ReactFabric-prod.js -1.9% -1.6% 242.14 KB 237.49 KB 41.75 KB 41.09 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -1.4% -1.2% 255.43 KB 251.91 KB 44.46 KB 43.92 KB RN_OSS_PROFILING
ReactFabric-profiling.js -1.2% -0.9% 248.09 KB 245.14 KB 43.11 KB 42.7 KB RN_OSS_PROFILING
ReactNativeRenderer-profiling.js -1.4% -1.2% 255.41 KB 251.89 KB 44.46 KB 43.92 KB RN_FB_PROFILING
ReactFabric-profiling.js -1.2% -0.9% 248.08 KB 245.13 KB 43.11 KB 42.7 KB RN_FB_PROFILING

scheduler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
scheduler-tracing.development.js -0.9% -1.9% 10.89 KB 10.79 KB 2.67 KB 2.62 KB NODE_DEV
scheduler-tracing.production.min.js 0.0% 🔺+0.3% 728 B 728 B 381 B 382 B NODE_PROD
scheduler-tracing.profiling.min.js 0.0% +0.2% 3.26 KB 3.26 KB 998 B 1000 B NODE_PROFILING
SchedulerTracing-dev.js -2.1% -5.1% 10.22 KB 10.01 KB 2.21 KB 2.09 KB FB_WWW_DEV
scheduler-unstable_mock.production.min.js 0.0% 🔺+0.1% 4.02 KB 4.02 KB 1.59 KB 1.59 KB NODE_PROD

Generated by 🚫 dangerJS

@acdlite acdlite force-pushed the replace-old-fiber-scheduler branch 2 times, most recently from 408abe0 to c05608a Compare April 11, 2019 23:59
The new Fiber Scheduler has been running in Facebook for several days
without issues. Let's switch to it.
@acdlite acdlite force-pushed the replace-old-fiber-scheduler branch from c05608a to c3af742 Compare April 12, 2019 00:20
@acdlite acdlite merged commit 9055e31 into facebook:master Apr 12, 2019
@MuYunyun
Copy link

MuYunyun commented Apr 12, 2019

Is the new implementation of Fiber Scheduler can be used independently? I'm looking forward for using it in some day!:smile:

BTW, the logic of the schedule is a bit difficult to understand, is there any articles or instruction to the core of it? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants