STEPS TO REPRODUCE: 1) Load http://w3c-test.org/webperf/tests/submission/W3C/NavigationTiming/monolitic.html 2) Hit the reload button ACTUAL RESULTS: The "connectStart-domainLookupEnd" test fails. EXPECTED RESULTS: No failures with the above steps ANALYSIS: As far as I can tell, we never end up with a connectStart in the transaction timings, so the DOM API returns the fetchStart value when asked for connectStart. But we _do_ end up with DNS timings from our mDNSPrefetch, because we do that no matter whether we're reading from cache. And of course the domainLookupEnd from the mDNSPrefetch comes after fetchStart. Can we either kill off the DNS prefetch or at least ignore its timings in cases when we end up not using its results?
If the DNS prefetch in this scenario is a potential pref issue, then I'm definitely for to remove it. I don't have data right now to decide. I can look how complicated would be to ignore domainLookupEnd when loading from cache. We also preconnect before a cache entry opens and before we can decide whether to do a net request at all, if I recall correctly. Then there could be a dns lookup anyway. Hence some code to ignore/nullify the domainLookupEnd might be appropriate.
This testcase is now part of the official test suite for the spec at http://w3c-test.org/webperf/tests/approved/navigation-timing/html5/test_timing_attributes_order.html
4 years ago
Valentin, do you think you could find time to look at this?
This is no longer reproducible. The bug is more or less the same as bug 1123920. The solution was to enforce the correct order of the timing objects by returning the previous timing order-wise when one of them was missing. So when connectStart is null because we loaded from the cache, we return domainLookupEnd instead of fetchStart.