Bug 258014

Summary: Navigation Timing L2 often returns negative timing values for documents served from memory cache
Product: WebKit Reporter: Andy Davies <ad>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: achristensen, beidson, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   
See Also: https://bugs.webkit.org/show_bug.cgi?id=298443
Attachments:
Description Flags
Screenshot showing negative NT2 values
none
NT1 calculated values none

Andy Davies
Reported 2023-06-13 04:03:10 PDT
Created attachment 466677 [details] Screenshot showing negative NT2 values Description: Navigation Level 2 API returns negative values for several metrics when the document is served from memory cache. Behaviour doesn't happen 100% of the time but seems common enough to make it easy to reproduce. Behaviours hasn't been reproduced when document comes from the network, or the disk cache. When there are negative values in NT2, the values calculated via NT1 appear to be reasonable Negative values appear to be constrained to: Reproduction: - Open speedcurve.com - Navigate between a couple of pages until the Inspector shows the document has been loaded from memory cache - Query the NT2 API i.e. performance.getEntriesByType('navigation')[0]; - Observe negative values (steps 2 & 3 might need repeating a few times) Notes: Tested on iPhone with iOS 16.5, Safari 16.5 (17615.2.9.11.6, 17615) and STP 171 (Safari 16.4, WebKit 17616.1.15) running on Intel Mac
Attachments
Screenshot showing negative NT2 values (246.94 KB, image/png)
2023-06-13 04:03 PDT, Andy Davies
no flags
NT1 calculated values (225.33 KB, image/png)
2023-06-13 04:04 PDT, Andy Davies
no flags
Andy Davies
Comment 1 2023-06-13 04:04:01 PDT
Created attachment 466678 [details] NT1 calculated values
Radar WebKit Bug Importer
Comment 2 2023-06-20 04:04:16 PDT
Note You need to log in before you can comment on or make changes to this bug.