3 ms·
Explain how that is different?
by tantalor 10y ago
Explain how that is different?
- STRML 10y agoIt's different because it can't just slow down a running task. Say you use up 150ms of CPU time. Chrome isn't going to let another timer fire for 15s. Then, you're late on a whole bunch of work that needs to get done, so the next timer takes 500ms. Chrome then throttles the next timer by 50s. And so on and so forth...
- tantalor 10y agoBut if your script had 1% of CPU, that 150ms workload would take 15s to complete. Then the next workload would be late in the same way and take 50s to complete. How is this different?
- STRML 10y agoIt depends on what you're doing. If you split up tasks and interleaves them (such as: process a few items, stop, set another timer, process a few more), actual CPU% throttling would be better. It would be easier to have certain timers take priority, such as heartbeat responses or notifications.