WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
210556
performance.getEntries() API is missing performance entries
https://bugs.webkit.org/show_bug.cgi?id=210556
Summary
performance.getEntries() API is missing performance entries
Jonas Badalic
Reported
2020-04-15 10:52:38 PDT
Created
attachment 396550
[details]
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
Attachments
Side-by-side test results
(553.66 KB, image/png)
2020-04-15 10:52 PDT
,
Jonas Badalic
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-04-15 17:17:49 PDT
<
rdar://problem/61858226
>
Ahmad Saleem
Comment 2
2022-08-09 12:54:40 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 ad "Broken Sync Version" does not have any failure and have 60 success and it is similar to other browsers. Since it seems to be fixed along the way, I am marking this as "RESOLVED CONFIGURATION CHANGED", if it is something still not fixed, appreciate if some can highlight difference in testing for my knowledge and learning. Thanks!
Alexey Proskuryakov
Comment 3
2022-08-18 16:56:50 PDT
Nice!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug