-
Notifications
You must be signed in to change notification settings - Fork 47k
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
When a root expires, flush all expired work in a single batch #13503
Conversation
ReactDOM: size: 🔺+0.2%, gzip: 🔺+0.1% Details of bundled changes.Comparing: bb62722...077addd react-dom
react-art
react-test-renderer
react-reconciler
react-native-renderer
schedule
Generated by 🚫 dangerJS |
It looks like it's helping. Still gets stuck sometimes but I suppose it's just two expirations happening one after the other (because the commit itself took a long time). But nothing like it was getting stuck before. |
f28c369
to
801a2d8
Compare
@gaearon Ready for review |
7f19945
to
0d9802f
Compare
Instead of flushing each level one at a time.
0d9802f
to
077addd
Compare
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.
This makes sense to me by itself but doesn't actually help the issue reproducible in the fixture. If you try to type a lot and then constantly add and remove characters it will eventually expire with isExpired = false
. However the scheduler thinks there's still some time before the timeout, so didTimeout
is false
. I'm not sure why but we need to fix this too?
Let's get this fix in, but we'll need a follow-up for scheduler itself. |
…ok#13503) Instead of flushing each level one at a time.
Still need to add some Suspense tests, and some comments. Pushing so Dan can test if it fixes the issue in the fixture.