New issue
Advanced search Search tips

Issue 912215 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 5
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

cache_storage should not schedule an index write every time a cache is opened

Project Member Reported by wanderview@chromium.org, Dec 5

Issue description

Currently CacheStorage schedules an index write every time CacheSizeUpdated is called:

https://cs.chromium.org/chromium/src/content/browser/cache_storage/cache_storage.cc?l=817&rcl=3c63c96973098d33a035d8572651660838307059

This method is always called after opening a Cache object:

https://cs.chromium.org/chromium/src/content/browser/cache_storage/cache_storage_cache.cc?l=2075&rcl=2f27f9b4c9fcb30f0721f0b4c8497d931cb84cf5

We should be able to avoid these writes if the size of the cache hasn't actually changed.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f5f1180225035d5be67d94b6d837ad8c593b5901

commit f5f1180225035d5be67d94b6d837ad8c593b5901
Author: Ben Kelly <wanderview@chromium.org>
Date: Wed Dec 05 20:26:37 2018

CacheStorage: Don't write index to disk when size is updated to same value.

Bug:  912215 

Change-Id: I1f966dbe6db5c1697cb38d48eabe2f39e0fbf5fe
Reviewed-on: https://chromium-review.googlesource.com/c/1363791
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614078}
[modify] https://crrev.com/f5f1180225035d5be67d94b6d837ad8c593b5901/content/browser/cache_storage/cache_storage.cc
[modify] https://crrev.com/f5f1180225035d5be67d94b6d837ad8c593b5901/content/browser/cache_storage/cache_storage_manager_unittest.cc

Status: Fixed (was: Untriaged)

Sign in to add a comment