RESOLVED FIXED300530
Align DOM timers to a nonzero alignment by default
https://bugs.webkit.org/show_bug.cgi?id=300530
Summary Align DOM timers to a nonzero alignment by default
Ryan Reno
Reported 2025-10-10 16:38:47 PDT
By default a not-maximally nested DOM timer is unaligned. This can cause serious thread scheduling issues in the presence of a "timer storm" where we build up pressure from a large amount of low but not zero timeout timers. In the worst cases we can end up scheduling a full 16ms of timers only to sleep the main thread for tens of microseconds before we go back to servicing more timers. This is clearly bad for power use. Experimenting with aligning DOM timers to a non-zero alignment allows for at least a single digit number of milliseconds where the main thread is sleeping which contributes greatly to reduced power use in the presence of abandoned timer handles piling up.
Attachments
Ryan Reno
Comment 1 2025-10-10 16:38:48 PDT
Ryan Reno
Comment 2 2025-10-10 16:42:13 PDT
EWS
Comment 3 2025-10-28 21:06:10 PDT
Committed 302278@main (c0b0499d32c9): <https://commits.webkit.org/302278@main> Reviewed commits have been landed. Closing PR #52146 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.