-
Notifications
You must be signed in to change notification settings - Fork 46.5k
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
Simplify discreteUpdates
#21773
Simplify discreteUpdates
#21773
Conversation
Now that discrete updates are flushed synchronously in a microtask, the `discreteUpdates` method used by our event system is only a optimization to save us from having to check `window.event.type` on every update. So we should be able to remove the extra logic. Assuming this lands successfully, we can remove `batchedEventUpdates` and probably inline `discreteUpdates` into the renderer, like we do for continuous updates.
Comparing: 3e8c86c...6cce423 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
I'm not sure how the description and the change are related. Discrete updates flushing in a micro-task doesn't apply to legacy mode and so shared code paths still need to be in place. Also, for controlled inputs which is when the timing of flushing finishEventHandler needs to happen before the promise next tick anyway I think. The simplification makes sense though. |
I mentioned microtasks because we don't bother to prevent overflushing anymore, because That's why I could remove |
Now that discrete updates are flushed synchronously in a microtask, the `discreteUpdates` method used by our event system is only a optimization to save us from having to check `window.event.type` on every update. So we should be able to remove the extra logic. Assuming this lands successfully, we can remove `batchedEventUpdates` and probably inline `discreteUpdates` into the renderer, like we do for continuous updates.
Now that discrete updates are flushed synchronously in a microtask, the
discreteUpdates
method used by our event system is only an optimization to save us from having to checkwindow.event.type
on every update. So we should be able to remove the extra logic.Assuming this lands successfully, we can remove
batchedEventUpdates
and probably inlinediscreteUpdates
into the renderer, like we do for continuous updates.