What the emptiness mean in devtools timings?

主宰稳场 提交于 2019-12-17 20:58:33

问题


Check this image with timings for a web page fetch.

There is gray at the beginning for stalled time, the green for waiting time, and the blue for receiving data. There is also a hollow, glaring nothingness in the middle.... what is that?

The image is from Google Chrome 43, normal devtools.


回答1:


I've written up an extensive explanation in the chromium bug for it: Issue 476749: DevTools: [network] explain empty bars preceeding request..

Here's the gist, empty bar time is usually one of a few things

  • The request was postponed because it's considered lower priority than scripts/styles (e.g. images)
  • The request was put on hold while we wait for an available TCP socket that's about to free up
  • The request was put on hold because the browser only does 6 connections per host.
  • Time spent making disk cache entries (typically very quick)

You can right click the headers to turn on "Connection ID" to see if different requests are sharing the same TCP connection. WebPageTest's connection view can also help with that.

But from the screenshot above, it appears the preload-scanner identified many scripts, styles, and images necessary for the page. It quickly started the styles and scripts and queued up images to be done later. They were delayed because of the 6 connections per host rule.



来源:https://stackoverflow.com/questions/31104147/what-the-emptiness-mean-in-devtools-timings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!