Commit 346242e
committed
SuspenseList: Reschedule at same priority
SuspenseList progressively renders items even if the list is CPU bound,
i.e. it isn't waiting for missing data. It does this by showing a
fallback for the remaining items, committing the items in that have
already finished, then starting a new render to continue working on
the rest.
When it schedules that subsequent render, it uses a slightly lower
priority than the current render: `renderExpirationTime - 1`.
This commit changes it to reschedule at `renderExpirationTime` instead.
I don't know what the original motivation was for bumping the expiration
time slightly lower. The comment says that the priorities of the two
renders are the same (which makes sense to me) so I imagine it was
motivated by some implementation detail. I don't think it's necessary
anymore, though perhaps it was when it was originally written. If it is
still necessary, we should write a test case that illustrates why.1 parent cb70753 commit 346242e
1 file changed
Lines changed: 3 additions & 9 deletions
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 130 | + | |
135 | 131 | | |
136 | 132 | | |
137 | 133 | | |
| |||
1118 | 1114 | | |
1119 | 1115 | | |
1120 | 1116 | | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
| 1117 | + | |
1124 | 1118 | | |
1125 | | - | |
| 1119 | + | |
1126 | 1120 | | |
1127 | 1121 | | |
1128 | 1122 | | |
| |||
0 commit comments