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

Rendering tasks should not jump the queue #16284

Merged
merged 1 commit into from
Aug 3, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Aug 3, 2019

When React schedules a rendering task, it passes a timeout option based on its expiration time. This is intended to avoid starvation by other React updates. However, it also affects the relative priority of React tasks and other Scheduler tasks at the same level, like data processing.

This adds a feature flag to disable passing a timeout option to Scheduler. React tasks will always append themselves to the end of the queue, without jumping ahead of already scheduled tasks.

This does not affect the order in which React updates within a single root are processed, but it could affect updates across multiple roots.

This also doesn't remove the expiration from Scheduler. It only means that React tasks are not given special treatment.

When React schedules a rendering task, it passes a `timeout` option
based on its expiration time. This is intended to avoid starvation
by other React updates. However, it also affects the relative priority
of React tasks and other Scheduler tasks at the same level, like
data processing.

This adds a feature flag to disable passing a `timeout` option to
Scheduler. React tasks will always append themselves to the end of
the queue, without jumping ahead of already scheduled tasks.

This does not affect the order in which React updates within a single
root are processed, but it could affect updates across multiple roots.

This also doesn't remove the expiration from Scheduler. It only means
that React tasks are not given special treatment.
@sizebot
Copy link

sizebot commented Aug 3, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

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.

4 participants