Random high content download time in chrome?

Viewed 9030

We have an API which randomly takes high content download time in chrome, It works fine always in firefox and takes an only few ms. The response size is 20kb uncompressed and 4kb compressed. The same request also works fine using curl.

Things that we have tried:

  1. Disabling If-None-Match header to disable cache response from the browser.
  2. Trying various compressions (gzip, deflate, br).
  3. Disabling compression.
  4. Disabling all chrome extensions.

The same request works fine sometimes on chrome but randomly returns very high content download time.

We are unable to understand the root cause of this issue. What are the other things we can try to minimize this time?

Chrome Network Tab

I made three requests here and the 3rd one took the most time (before the last spike). CPU does not seem to be maxing out for a longer period of time. Most of the time is idle time.

performance graph chrome

Also, When replaying the call using Replay XHR menu, the Content download period drops from 2s to 200 ms.

2 Answers
Related