问题
I see the following anomaly in Resource Timings panel:
Content Download time (from Network time) is unexpectedly high for some resource, which has been requested while loading a page: Content Download time for 1 KB is about 1 sec.
although there is no network issue: I've checked that with Wireshark trace + place my browser as close to Server as it was possible. Ping shows about 0.3ms RTT.
I'm just wondering if the Network performance is the only reason according to the article by Jonathan Garbee https://developers.google.com/web/tools/chrome-devtools/network-performance/understanding-resource-timing?hl=en
I've checked download time for that resource particularly (just putting its address in browser's address bar), and it took less than 100ms for the whole HTTP request (Content Download time was about 1ms) for that single resource.
I've checked that resource request time using Events in net-internals. And the results didn't fit to timings in DevTools. for the same time and the same resource of 1 KB there was the following: Events from net-internals showed 100 ms and Content Download in DevTools was 900 ms. See screenshots:
Content Download time
net-internals Event for the same HTTP request
Googling for a while I've found some discussions that Timings are recorded by Render process, and if it is busy there can be significant time gap between actual point of time when responseEnd (or responseFinish, I don't remember the exact event's name) event happened and the point in time when Render process registered that events.
That can explain the long download time in DevTools Timings. But if that explanation is trustworthy?
Can someone confirm or deny that Timings recording depend on Render process workload, and for fat applications Timings provided in DevTools could be distorted by Render process being loaded heavily...
If it is actually True, then what could be the source of truth for performance related statistics?
Sorry for not being familiar with Chromium source code structure so far. It will take weeks to check the answer by myself. Unfortunately I've got no time for that.
PS is there any resource, which describes performance measurements in Chrome (I mean, how Chrome does it internally)? "Understanding Resource Timing" is not enough any more.
Best regards, Anton
来源:https://stackoverflow.com/questions/48577266/content-download-time-anomaly-in-devtools-timings