Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Issue 2115043002: Precache bytes cap should be based on total bytes fetched from network (Closed)

Created:
4 years, 5 months ago by Raj
Modified:
4 years, 5 months ago
Reviewers:
twifkak
CC:
chromium-reviews, wifiprefetch-reviews_google.com
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Precache bytes cap should be based on total bytes fetched from network The current behavior is that precache task will stop if size of a resource exceeds max_bytes_per_resource or if total size of all resources exceeds max_bytes_total. But there are resources which are sent gzipped, and they are stored in cache in gzipped. So the max bytes cap should check the bytes used in network instead of the resource size. BUG=625270

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -4 lines) Patch
M components/precache/core/precache_fetcher.cc View 3 chunks +3 lines, -4 lines 7 comments Download

Messages

Total messages: 7 (1 generated)
Raj
ptal
4 years, 5 months ago (2016-07-01 20:41:08 UTC) #2
twifkak
Sorry I wasn't able to offer any solutions, only problems! https://codereview.chromium.org/2115043002/diff/1/components/precache/core/precache_fetcher.cc File components/precache/core/precache_fetcher.cc (right): https://codereview.chromium.org/2115043002/diff/1/components/precache/core/precache_fetcher.cc#newcode238 ...
4 years, 5 months ago (2016-07-01 23:59:25 UTC) #3
Raj
I was not able to find a simple fix for this issue. I am willing ...
4 years, 5 months ago (2016-07-14 18:41:30 UTC) #4
twifkak
On 2016/07/14 18:41:30, Raj wrote: > I was not able to find a simple fix ...
4 years, 5 months ago (2016-07-18 03:59:44 UTC) #5
Raj
On 2016/07/18 03:59:44, twifkak wrote: > On 2016/07/14 18:41:30, Raj wrote: > > I was ...
4 years, 5 months ago (2016-07-18 18:17:52 UTC) #6
twifkak
4 years, 5 months ago (2016-07-19 00:18:23 UTC) #7
On 2016/07/18 18:17:52, Raj wrote:
> On 2016/07/18 03:59:44, twifkak wrote:
> > On 2016/07/14 18:41:30, Raj wrote:
> > > I was not able to find a simple fix for this issue. I am willing to close
> this
> > > CL and the issue. WDYT.
> > > 
> > > The open issue is that OnURLFetchDownloadProgress() could cancel gzipped
> > > resources which are large than max_bytes_per_resource cap in uncompressed
> > state.
> > > But the network usage and cache usage of the resource will only be its
> > > compressed size.
> > 
> > Perhaps we could use uncompressed bytes for the per-resource cap while using
> > compressed bytes for the overall cap. But I'm also willing to close the
issue
> --
> > doesn't seem critical to me -- but I could be wrong?
> 
> Yes. In succinct that is what we are doing.
> OnURLFetchDownloadProgress() uses uncompressed bytes for the per-resource cap.
> In all other places compressed bytes are accounted for.

Oh, okay, closing SGTM then. I think for the most part the compression ratio is
>50% (here are some examples:
https://developers.google.com/web/fundamentals/performance/optimizing-content...),
so we may be overeager in cancelling downloads, but not too much so.

Powered by Google App Engine
This is Rietveld 408576698