New issue
Advanced search Search tips

Issue 612985 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Progress bar miscounts resources in progress

Project Member Reported by japhet@chromium.org, May 18 2016

Issue description

In chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/core/loader/ProgressTracker.cpp, when trying to determine how many bytes we're going to load, we start by doing:

int numPendingOrLoadingRequests = m_frame->document()->fetcher()->requestCount();
estimatedBytesForPendingRequests = progressItemDefaultEstimatedLength * numPendingOrLoadingRequests;

...and then adding to it the estimated sizes we store on ProgressItems. This leads to both undercount and overcounting. The overcounting is because requestCount() will include resources that have received responses headers, which are therefore already in the set of ProgressItems. The undercounting is because requestCount() excludes requests that do not block the onload event, which will be included in ProgressItems when response headers are eventually received.

This may be rendered obsolete by some of the experiments in  Issue 513459 , but if not, we should probably fix those cases.
 

Comment 1 by japhet@chromium.org, Jul 28 2016

Status: Fixed (was: Available)
https://chromium.googlesource.com/chromium/src/+/98e9bd8599c50b3a9342e6109457982435815c4d%5E%21 stopped using requestCouunt() and puts requests in m_progressItems at request start time, so this should be fixed.

Sign in to add a comment