[Webkit-unassigned] [Bug 92438] New: Teach Timer how to handle timer priorities.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 26 16:43:54 PDT 2012


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

           Summary: Teach Timer how to handle timer priorities.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: skyul at company100.net


Currently, HTMLParserScheduler checks if the layout timer is active (a layout is scheduled) and defer its timer. This policy is hardcoded in the parser code. We can handle this automatically by teaching Timer how to handle timer priorities.

Added an optional TimerPriority argument to the Timer constructor. When fired, the timer checks if there is other active timer with higher priority. If there is one, the timer defers itself automatically. This is slightly more efficient because the timer can query the other timer's nextFireInterval and defers itself by that amount instead of polling with 0 interval.

Priority value can be one of TimerPriority enum values: TimerPriorityNone, TimerPriorityLow, TimerPriorityMedium and TimerPriorityHigh.
TimerPriorityNone is special and ignores the priority. Because TimerPriorityNone is the default value, existing Timer code paths are not affected by this change.

Gave the layout timer higher priority than the parser scheduler timer. Then the parser scheduler timer is defered until there is no active layout timer.

-- 
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