[Webkit-unassigned] [Bug 28455] ThreadTimer: avoid blocking UI when too many timers ready to fire

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 19 12:43:46 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28455





--- Comment #4 from Dmitry Titov <dimich at chromium.org>  2009-08-19 12:43:42 PDT ---
I refactored the code Darin originally wrote to the point when I almost
understand it :-) so let me add a comment: I think this will remove and then
re-insert unfired timers into the heap structure, causing unneeded sort
operations - which might be unwanted in a scenario when we have so many timers
it freezes UI...

Bug 23865 has a patch addressing the same very issue, but instead of taking all
the ready timers first into the separate list and then re-inserting the unfired
timers back, it just fires them in a loop one-by-one, taking them from original
heap until time interval permits. This avoids taking and then re-inserting
timers into timer heap, while still keeping track of removed and rescheduled
timers.

That patch was not landed because the original bug was about even bigger issue
(recursive multiplication of timers) - but for avoiding UI freeze IMHO the
patch would work better. Also, I think it is useful for any port and doesn't
affect functionality so it doesn't need ENABLE define guards.

If you find this makes sense, please feel free to use the code in Bug 23865 as
an idea or ping me to continue to work on it...

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list