[Webkit-unassigned] [Bug 185575] New: Overly aggressive timer throttling in service workers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 11 19:35:37 PDT 2018


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

            Bug ID: 185575
           Summary: Overly aggressive timer throttling in service workers
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Macintosh
                OS: macOS 10.13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Service Workers
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zbbjornson at gmail.com

Safari seems to throttle timers extremely aggressively in service workers. If I run this code:

    let previous = Date.now();
    const interval = 1000;
    setInterval(() => {
        const now = Date.now();
        const separation = now - previous;
        previous = now;
        console.log("tick", separation);
    }, interval);

most ticks run after [interval + 10,000 ms] -- e.g. 1000 ms runs at 11,000 ms and 100 ms runs at 10,100 ms. Sometimes they run closer to the actual [interval], when the main page is doing work. Disabling "DOM Timer Throttling" and "Hidden Page Timer Throttling" has no effect.

The same code in the main browser thread runs when expected (just after [interval]). Edge, Firefox and Chrome run the timers when expected in service workers.

This is a problem for our application because we use timers to batch multiple HTTP requests into fewer HTTP requests. Consequently, our batched HTTP requests are delayed up to 10 seconds.

(Safari v 11.1 / 13605.1.33.1.4)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180512/69e6c1a6/attachment-0001.html>


More information about the webkit-unassigned mailing list