mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
0803d22479
* Don't consider "Never" expiration as part of most recent event time This doesn't happen with deprioritization since those are not "updates" by themselves so they don't go into this accounting. However, they are real updates if they were scheduled as Idle pri using the scheduler explicitly. It's unclear what suspense should do for these updates. For offscreen work, we probably want them to commit immediately. No point in delay them since they're offscreen anyway. However if this is an explicit but very low priority update that might not make sense. So maybe this means that these should have different expiration times? In this PR I just set the suspense to the lowest JND. However, we don't want is for these things to commit earlier in case they got batched in with other work so I also ensured that they're not accounted for in in the workInProgressRootMostRecentEventTime calculation at all. This makes them commit immediately if they're by themselves, or after the JND of whatever they were batched in with. Ultimately, I think that we should probably never schedule anything at Never that isn't truly offscreen so this should never happen. However, that begs the question what happens with very low pri work that suspends. Do we always work at that level first? * Adjust test to account for the new shorter suspense time