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

Issue 2719023007: IndexedDB: Optimize range deletion operations (e.g. clearing a store) (Closed)

Created:
3 years, 9 months ago by jsbell
Modified:
3 years, 9 months ago
Reviewers:
dmurph
CC:
chromium-reviews, jam, jsbell+idb_chromium.org, darin-cc_chromium.org, cmumford
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IndexedDB: Optimize range deletion operations (e.g. clearing a store) Range deletion in leveldb involves walking over the range to identify keys to remove. The wrapper class used by IndexedDB to implement transactions was applying this same logic but then also (1) doing a Seek() on each found record to mark it deleted and (2) notifying iterators for every record. This was optimized by teaching the transaction wrapper how to clear ranges itself. The |delete_count| out param plumbed through various methods was removed, but it was only used in tests. On a test for clearing a store with 100k index entries, a 2x speedup was observed. BUG=693799 TEST=content_unittests --gtest_filter='LevelDBTransaction*' Review-Url: https://codereview.chromium.org/2719023007 Cr-Commit-Position: refs/heads/master@{#454290} Committed: https://chromium.googlesource.com/chromium/src/+/1d62ad3d5531d0becbcb1a5798747a9671db6297

Patch Set 1 #

Total comments: 6

Patch Set 2 : Review feedback: docs and refactors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+487 lines, -253 lines) Patch
M content/browser/indexed_db/indexed_db_backing_store.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store.cc View 10 chunks +12 lines, -37 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store_unittest.cc View 4 chunks +10 lines, -22 lines 0 comments Download
M content/browser/indexed_db/indexed_db_database.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_transaction.h View 1 10 chunks +34 lines, -15 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_transaction.cc View 1 9 chunks +65 lines, -16 lines 0 comments Download
A content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc View 1 chunk +363 lines, -0 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_unittest.cc View 2 chunks +0 lines, -159 lines 0 comments Download
M content/test/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (12 generated)
jsbell
dmurph@ - can you take a look? This is a redo of https://codereview.chromium.org/2708223002/ - the ...
3 years, 9 months ago (2017-03-01 00:16:04 UTC) #4
dmurph
lgtm with comment and naming nits - especially about describing what the two iterators do ...
3 years, 9 months ago (2017-03-01 20:06:35 UTC) #7
jsbell
Feedback incorporated - can you take another look dmurph@ ? https://codereview.chromium.org/2719023007/diff/1/content/browser/indexed_db/leveldb/leveldb_transaction.cc File content/browser/indexed_db/leveldb/leveldb_transaction.cc (right): https://codereview.chromium.org/2719023007/diff/1/content/browser/indexed_db/leveldb/leveldb_transaction.cc#newcode71 ...
3 years, 9 months ago (2017-03-01 22:45:26 UTC) #10
dmurph
lgtm
3 years, 9 months ago (2017-03-01 23:06:56 UTC) #13
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/2719023007/20001
3 years, 9 months ago (2017-03-02 17:16:16 UTC) #15
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 17:22:05 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/1d62ad3d5531d0becbcb1a579874...

Powered by Google App Engine
This is Rietveld 408576698