Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
508 views
in Technique[技术] by (71.8m points)

performance - What does the times mean in Google Chrome's timeline in the network panel?

Often when troubleshooting performance using the Google Chrome's network panel I see different times and often wonder what they mean.

Can someone validate that I understand these properly:

  1. Blocking: Time blocked by browser's multiple request for the same domain limit(???)
  2. Waiting: Waiting for a connection from the server (???)
  3. Sending: Time spent to transfer the file from the server to the browser (???)
  4. Receiving: Time spent by the browser analyzing and decoding the file (???)
  5. DNS Lookup: Time spent resolving the hostname.
  6. Connecting: Time spent establishing a socket connection.

Now how would someone fix long blocking times?

Now how would someone fix long waiting times?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Sending is time spent uploading the data/request to the server. It occurs between blocking and waiting. For example, if I post back an ASPX page this would indicate the amount of time it took to upload the request (including the values of the forms and the session state) back to the ASP server.

Waiting is the time after the request has been sent, but before a response from the server has been received. Basically this is the time spent waiting for a response from the server.

Receiving is the time spent downloading the response from the server.

Blocking is the amount of time between the UI thread starting the request and the HTTP GET request getting onto the wire.

The order these occur in is:

  1. Blocking*
  2. DNS Lookup
  3. Connecting
  4. Sending
  5. Waiting
  6. Receiving

*Blocking and DNS Lookup might be swapped.

The network tab does not indicate time spent processing.

If you have long blocking times then the machine running the browser is running slowly. You can fix this by upgrading the machine (more RAM, faster processor, etc.) or by reducing its workload (turn off services you do not need, closing programs, etc.).

Long wait times indicate that your server is taking a long time to respond to requests. This either means:

  • The request takes a long time to process (like if you are pulling a large amount of data from the database, large amounts of data need to be sorted, or a file has to be found on an HDD which needs to spin up).
  • Your server is receiving too many requests to handle all requests in a reasonable amount of time (it might take .02 seconds to process a request, but when you have 1000 requests there will be a noticeable delay).

The two issues (long waiting + long blocking) are related. If you can reduce the workload on the server by caching, adding new server, and reducing the work required for active pages then you should see improvements in both areas.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...