Commit 4132d53
committed
Ensure a minimum frequency for event processing even if the UI slows
Previously we relied just on requestAnimationFrame, which should stay
fairly proportional to UI rendering perf I think. Unfortunately though
this is paused completely in the background (not just throttled) and
could theoretically reduce processing to very slow low levels if
something else starves UI updates. To help with that, we now use a
setTimeout backup as well.1 parent e82e2ff commit 4132d53
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
| 220 | + | |
215 | 221 | | |
216 | 222 | | |
217 | | - | |
218 | | - | |
219 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
| |||
0 commit comments