-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Remove experimental scheduler flags #16672
Conversation
// prevent idle periods. | ||
let idleTimeoutID; | ||
if (requestTimerEventBeforeFirstFrame) { | ||
idleTimeoutID = setTimeout(function onTimerEventBeforeFirstFrame() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you've removed this timeout, there's now no timeout fallback for the initial rAF
call, like there is for subsequent rAFs:
react/packages/scheduler/src/forks/SchedulerHostConfig.default.js
Lines 306 to 311 in ff00645
const onTimeout = () => { | |
frameDeadline = getCurrentTime() + frameLength / 2; | |
performWorkUntilDeadline(); | |
rAFTimeoutID = setTimeout(onTimeout, frameLength * 3); | |
}; | |
rAFTimeoutID = setTimeout(onTimeout, frameLength * 3); |
But it's whatever since we're going to disable the rAF stuff anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That timeout should have already been in the else
branch of this feature, anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's now no timeout fallback for the initial rAF call, like there is for subsequent rAFs
I guess that explains #16629?
React: size: 0.0%, gzip: 0.0% Details of bundled changes.Comparing: 040ca0f...51f728a react
scheduler
|
Removes
requestIdleCallbackBeforeFirstFrame
andrequestTimerEventBeforeFirstFrame
.Both were rAF-specific experiments but we went with MessageLoop instead. We left rAF temporarily in the code but since we never actually used these code paths, I think we should delete them to make the code easier to understand.