[Webkit-unassigned] [Bug 225737] New: Resource Timing: Duration is 0 in many cases

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 12 22:25:20 PDT 2021


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

            Bug ID: 225737
           Summary: Resource Timing: Duration is 0 in many cases
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Mac (Intel)
                OS: macOS 10.15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: nic at nicj.net

I'm seeing many cases where ResouceTiming's duration attribute is 0 when it should not be.  It should only be 0 if it truly took 0ms to load (e.g. fast cache?).

For example, see some of the test cases here: https://nicj.net/dev/resourcetiming/error-resources.html

There are 2 cross-origin test cases where the duration is showing 0.

* 4xx Result Code (cross-origin)

{
  "name": "[cross origin 404]",
  "entryType": "resource",
  "startTime": 124,
  "duration": 0,
  "initiatorType": "img",
  "nextHopProtocol": "h2",
  "workerStart": 0,
  "redirectStart": 0,
  "redirectEnd": 0,
  "fetchStart": 124,
  "domainLookupStart": 0,
  "domainLookupEnd": 0,
  "connectStart": 0,
  "connectEnd": 0,
  "secureConnectionStart": 0,
  "requestStart": 0,
  "responseStart": 0,
  "responseEnd": 234
}

* 5xx Result Code (cross-origin)

{
  "name": "[cross origin 500]",
  "entryType": "resource",
  "startTime": 124,
  "duration": 0,
  "initiatorType": "img",
  "nextHopProtocol": "h2",
  "workerStart": 0,
  "redirectStart": 0,
  "redirectEnd": 0,
  "fetchStart": 124,
  "domainLookupStart": 0,
  "domainLookupEnd": 0,
  "connectStart": 0,
  "connectEnd": 0,
  "secureConnectionStart": 0,
  "requestStart": 0,
  "responseStart": 0,
  "responseEnd": 234
}

Both of these cases have a non-zero fetchStart and responseEnd, and the difference between the two is non-zero.  For example, the later case should have a duration of 234-124=110.

In the above two cases, these were for non-200 responses.  This may be related to https://bugs.webkit.org/show_bug.cgi?id=202040?

However, I'm not convinced this is only for non-200 responses.  For example, I went to CNN.com and 105 of 150 resources had a duration==0.

-- 
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/20210513/29d479c3/attachment.htm>


More information about the webkit-unassigned mailing list