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

Issue 2856533003: Add background-wide file metadata cache. (Closed)

Created:
3 years, 7 months ago by tetsui
Modified:
3 years, 6 months ago
Reviewers:
fukino
CC:
chromium-reviews, tfarina, yamaguchi+watch_chromium.org, oka+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, jlklein+watch-closure_chromium.org, fukino+watch_chromium.org, vitalyp+closure_chromium.org, dbeam+watch-closure_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add background-wide file metadata cache. Several background classes needs file metadata to perform their tasks. However, Metadata cache was only available to foreground classes. Also, lifetime of foreground metadata cache is tied to windows, so we have to maintain separate Least Recently Used cache in the background. As having separate cache for several background classes is inefficient, we are going to have global cache class that is shared among them. This has huge performance impact on slow storage devices such as MTP conencted ones. TEST=manually tested. BUG=716309, 712121 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2856533003 Cr-Commit-Position: refs/heads/master@{#476228} Committed: https://chromium.googlesource.com/chromium/src/+/e32d7951cd631cbeccd84b0ce874a41c9ee12faa

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Fix compile error. #

Patch Set 4 : Fix unit tests. #

Total comments: 6

Patch Set 5 : Resolve review comments. #

Patch Set 6 : Rename global_metadata_cache to metadata_proxy. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -64 lines) Patch
M ui/file_manager/file_manager/background/js/background_scripts.js View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/compiled_resources2.gyp View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/duplicate_finder_unittest.html View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/file_operation_manager.js View 1 2 3 4 5 1 chunk +12 lines, -10 lines 0 comments Download
M ui/file_manager/file_manager/background/js/file_operation_manager_unittest.html View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/file_operation_util.js View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/background/js/import_history.js View 1 2 3 4 5 1 chunk +34 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/import_history_unittest.html View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/import_history_unittest.js View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/background/js/media_scanner.js View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M ui/file_manager/file_manager/background/js/media_scanner_unittest.html View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A ui/file_manager/file_manager/background/js/metadata_proxy.js View 1 2 3 4 5 1 chunk +38 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/common/js/importer_common.js View 1 chunk +0 lines, -36 lines 0 comments Download
M ui/file_manager/file_manager/common/js/importer_common_unittest.html View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/common/js/importer_common_unittest.js View 1 2 3 1 chunk +0 lines, -15 lines 0 comments Download

Messages

Total messages: 31 (23 generated)
tetsui
fukino@: Please take a look! Thank you!
3 years, 6 months ago (2017-05-31 10:43:58 UTC) #13
fukino
https://codereview.chromium.org/2856533003/diff/60001/ui/file_manager/file_manager/background/js/global_metadata_cache.js File ui/file_manager/file_manager/background/js/global_metadata_cache.js (right): https://codereview.chromium.org/2856533003/diff/60001/ui/file_manager/file_manager/background/js/global_metadata_cache.js#newcode11 ui/file_manager/file_manager/background/js/global_metadata_cache.js:11: var MAX_CACHED_METADATA = 10000; Name it as MAX_CACHED_METADATA_ as ...
3 years, 6 months ago (2017-06-01 03:37:46 UTC) #14
tetsui
Thank you! How about the naming of global_metadata_cache? https://codereview.chromium.org/2856533003/diff/60001/ui/file_manager/file_manager/background/js/global_metadata_cache.js File ui/file_manager/file_manager/background/js/global_metadata_cache.js (right): https://codereview.chromium.org/2856533003/diff/60001/ui/file_manager/file_manager/background/js/global_metadata_cache.js#newcode11 ui/file_manager/file_manager/background/js/global_metadata_cache.js:11: var ...
3 years, 6 months ago (2017-06-01 04:46:59 UTC) #17
fukino
On 2017/06/01 04:46:59, tetsui wrote: > Thank you! How about the naming of global_metadata_cache? It ...
3 years, 6 months ago (2017-06-01 07:01:31 UTC) #20
tetsui
Thanks!
3 years, 6 months ago (2017-06-01 08:21:41 UTC) #25
fukino
LGTM. Thank you!
3 years, 6 months ago (2017-06-01 08:27:18 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2856533003/100001
3 years, 6 months ago (2017-06-01 08:28:00 UTC) #28
commit-bot: I haz the power
3 years, 6 months ago (2017-06-01 08:32:07 UTC) #31
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/e32d7951cd631cbeccd84b0ce874...

Powered by Google App Engine
This is Rietveld 408576698