Investigate postponing setTimeout/Interval runs when there is important user input pending
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
People
(Reporter: smaug, Assigned: sefeng)
References
Details
In some cases timeout callbacks get run while there might be more important user input
(non-move events basically) pending.
Same issue applies to xhr.onload and fetch() and such. But perhaps worth to investigate if setTimeout/Interval case could be improved, and whether that could help with responsiveness.
Reporter | ||
Comment 1•4 years ago
|
||
Note, input events do already have their own queue. So it is possible that it should be tweaked instead. Or that setTimeout/Interval should get their own priority in the main thread (even though they already use a ThrottledEventQueue).
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
We started this task by implementing a telemetry to report the number of pending input events in IPC channel when the timeout handler is about to run.
Looking at the first 2 days data, 99% were 0, so perhaps we don't need to do any tweaks since most of the time there are just 0 pending inputs. But yeah, we should check the graph again once we have more data.
Assignee | ||
Comment 3•4 years ago
|
||
It just looks like we don't need to worry about this, as the majority is just having 0 pending input event.
What do you think Olli?
Reporter | ||
Comment 4•11 months ago
|
||
I think the current input event prioritization is good enough.
Description
•