[Webkit-unassigned] [Bug 210556] New: performance

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 15 10:52:38 PDT 2020


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

            Bug ID: 210556
           Summary: performance
           Product: WebKit
           Version: Safari 13
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jonas at badalic.com

Created attachment 396550

  --> https://bugs.webkit.org/attachment.cgi?id=396550&action=review

Side-by-side test results

performance.getEntries() API is missing performance entries in Safari 13 on both mobile and desktop.

Context: 
I am sending multiple requests to different server nodes and attempting to use the performance API to retrieve the timings of each individual request in order to perform some latency computations. I am using fetch to do the actual requests and after each fetch call, I check the performance.getEntries list to find the resource I requested in order to save it's timing. Each individual request has a unique and immutable query param that identifies the sequence in which it was ran.

The requests run synchronously in order to minimize network overhead and avoid overloading the device. All of the requests respond with 200 status, but based on how they are executed will or will not end up being listed by calling performance.getEntries().

Bug: 
When executing requests synchronously, listing entries via performance.getEntries() will end up with partial lists that are missing the network requests that were sent - the missing requests appear to be non deterministic and randomly missing. Same goes for the size of performance.getEntries() which ends up containing different number of resource timings in each different call. If we however send all the requests asynchronously, the error rate is 0 and all the request timings are successfully retrieved by calling getEntries()

I have created 2 codesandbox cases:
1. ✅Working async version https://codesandbox.io/s/relaxed-poincare-hllei?file=/src/index.ts
2. ��Broken sync version https://codesandbox.io/s/elated-glitter-rexby?file=/src/index.ts

What might be confusing here, is the execution flow of sync vs async execution, but I assume that this should not matter, as each individual promise still looks like fetch(url).then(() => collectPerformanceTiming(url) and how all of the requests are orchestrated should be irrelevant unless I'm missing something.

I've tried reproducing the issue on either Chrome (v80) or Firefox (v74), but didn't manage to reproduce the problem I'm seeing on Safari.

Thank you everyone for the help and the work you are doing �� Let me know if there's something else I can help with or if the description doesn't suffice

-- 
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/20200415/53533271/attachment.htm>


More information about the webkit-unassigned mailing list