Local storage: Add area cache on renderer side

Desktop / Chromium - Siddhartha [chromium.org] - 13 October 2017 01:20 EDT

On each navigation the local storage database is cleared and created again with a mojo message to browser to load the whole database from disk. To avoid that, keep a cache of the database in renderer.

BUG=743187

Change-Id: Ic91144aebd5e1948bbbb1a50b58025a4dd7592c7 Reviewed-on: https://chromium-review.googlesource.com/662117

5af5bdc Local storage: Add area cache on renderer side
content/renderer/dom_storage/DEPS | 1 +
.../dom_storage/local_storage_cached_area.cc | 4 +-
.../dom_storage/local_storage_cached_area.h | 4 +-
.../local_storage_cached_area_unittest.cc | 166 ++++-----------------
.../dom_storage/local_storage_cached_areas.cc | 68 +++++++--
.../dom_storage/local_storage_cached_areas.h | 14 +-
.../local_storage_cached_areas_unittest.cc | 53 +++++++
.../renderer/dom_storage/mock_leveldb_wrapper.cc | 74 +++++++++
.../renderer/dom_storage/mock_leveldb_wrapper.h | 109 ++++++++++++++
content/test/BUILD.gn | 3 +
tools/metrics/histograms/enums.xml | 6 +
tools/metrics/histograms/histograms.xml | 9 ++
12 files changed, 353 insertions(+), 158 deletions(-)

Upstream: git.chromium.org


  • Share