[devtools] Exponential back-off/retry for 'loadNetworkResource'
This CL adds a simple exponential back-off & retry strategy to the inspector's loadNetworkResource method. A retry is only attempted if the load failed with net::ERR_INSUFFICIENT_RESOURCES. Retrying ensures that the kMaxOutstandingRequestsPerProcess limit in the network component does not cause load failures to the front-end. Before this CL, bursty loads from the DevTools front-end, such as they occur during fetching of source maps for large webpages, could result in load failures of source maps, when in reality the problem was that too many source maps where loaded at once. The initial back-off delay was chosen to be 250ms, as the intention is to give the network stack some time to finish outstanding requests, which are expected to take some time if there are so many of them that the request limit triggers. The back-off delay is 250ms*1.3^n and retrying is aborted when the delay exceeds 10s (14 tries in total). Bug: chromium:1013124 Change-Id: I2759cfa035fc3952d960d43958536d5e9df613b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1852212 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#705537}
Showing
Please register or sign in to comment