When a root expires, flush all expired work in a single batch#13503
When a root expires, flush all expired work in a single batch#13503gaearon merged 1 commit intofacebook:masterfrom
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
gaearon
left a comment
There was a problem hiding this comment.
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.