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

[Scheduler] Delete old rAF implementation #16271

Closed
wants to merge 1 commit into from

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Aug 1, 2019

Our performance tests indicate that the message loop implementation has better CPU utilization than the current rAF one. This commit removes the feature flag and deletes the rAF implementation.

I removed the old SchedulerDOM tests because they assumed a rAF implementation. I ported the relevant tests to the SchedulerBrowser test suite.

Opening the PR now, but I won't merge this until after 16.9.

Our performance tests indicate that the message loop implementation has
better CPU utilization than the current rAF one. This commit removes the
feature flag and deletes the rAF implementation.
@sizebot
Copy link

sizebot commented Aug 1, 2019

React: size: -2.2%, gzip: -3.3%

Details of bundled changes.

Comparing: f440bfd...5113349

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js -5.5% -5.4% 117.24 KB 110.74 KB 29.39 KB 27.82 KB UMD_DEV
react.production.min.js -2.2% -3.3% 13.03 KB 12.74 KB 5.08 KB 4.91 KB UMD_PROD
react.profiling.min.js -2.1% -3.1% 15.23 KB 14.9 KB 5.61 KB 5.44 KB UMD_PROFILING
react.development.js 0.0% 0.0% 72.28 KB 72.28 KB 18.94 KB 18.94 KB NODE_DEV
react.production.min.js 0.0% 0.0% 6.68 KB 6.68 KB 2.75 KB 2.75 KB NODE_PROD

scheduler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
SchedulerMock-dev.js -1.2% -1.3% 21.36 KB 21.11 KB 4.66 KB 4.6 KB FB_WWW_DEV
scheduler.development.js -21.8% -21.1% 29.96 KB 23.43 KB 7.35 KB 5.8 KB NODE_DEV
scheduler.production.min.js -5.1% -7.0% 5.68 KB 5.4 KB 2.18 KB 2.02 KB NODE_PROD
Scheduler-dev.js -22.1% -21.2% 30.79 KB 23.99 KB 7.48 KB 5.89 KB FB_WWW_DEV
Scheduler-prod.js -19.0% -14.8% 17.92 KB 14.52 KB 3.7 KB 3.16 KB FB_WWW_PROD
scheduler-tracing.development.js 0.0% 0.0% 11.69 KB 11.69 KB 3.01 KB 3.02 KB NODE_DEV
scheduler-tracing.production.min.js 0.0% 🔺+0.5% 728 B 728 B 382 B 384 B NODE_PROD
scheduler-unstable_mock.development.js 0.0% 0.0% 20.8 KB 20.8 KB 4.56 KB 4.57 KB UMD_DEV
scheduler-tracing.profiling.min.js 0.0% +0.1% 3.26 KB 3.26 KB 999 B 1000 B NODE_PROFILING
scheduler-unstable_mock.production.min.js 0.0% 🔺+0.1% 5.08 KB 5.08 KB 2 KB 2 KB UMD_PROD
scheduler-unstable_mock.development.js 0.0% 0.0% 20.61 KB 20.61 KB 4.5 KB 4.5 KB NODE_DEV
scheduler-unstable_mock.production.min.js 0.0% 🔺+0.1% 5.07 KB 5.07 KB 1.94 KB 1.94 KB NODE_PROD

Generated by 🚫 dangerJS

runtime.assertLog(['Message Event', 'A', 'B']);
});

it('multiple tasks with a yield in between', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test breaks after the min heap refactor.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok that's because it needs 4999 instead of 5000 now. Must be some comparison condition flip. Probably doesn't matter.

gaearon added a commit to gaearon/react that referenced this pull request Aug 15, 2019
@gaearon
Copy link
Collaborator

gaearon commented Aug 15, 2019

Since we want to keep both for now, I pulled all test except delayed task (which would need setTimeout setup fixes that break rAF tests) into #16407.

gaearon added a commit that referenced this pull request Aug 19, 2019
* Add a regression test for cancelCallback with message loop

* If there's nothing scheduled, we're not running

* Add more tests from #16271
@acdlite
Copy link
Collaborator Author

acdlite commented Nov 1, 2019

Will open new PR

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.

None yet

4 participants