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

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

Created:
3 years, 10 months ago by jsbell
Modified:
3 years, 10 months ago
Reviewers:
cmumford, 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, which was inefficient due to (1) complexity in walking two iterators (one for the uncommitted transaction data and one for the backing store data) and (2) notifying iterators for every record. This was optimized by clearing the range in the uncommitted data first, then simply walking the range in the backing store, and deferring notifying iterators until the end. This required removing the |delete_count| out param plumbed through various methods, but it was only used in tests. On a test for clearing a store with 100k index entries, a 4x speedup was observed. BUG=693799 TEST=content_unittests --gtest_filter='LevelDBTransactionTest.*' Review-Url: https://codereview.chromium.org/2708223002 Cr-Commit-Position: refs/heads/master@{#452324} Committed: https://chromium.googlesource.com/chromium/src/+/339d49e89f42347c7b85ac31cb0e9ebd8163025d

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+432 lines, -227 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 2 chunks +15 lines, -4 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_transaction.cc View 2 chunks +24 lines, -1 line 0 comments Download
A content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc View 1 chunk +368 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 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
jsbell
cmumford@ - please take a look?
3 years, 10 months ago (2017-02-21 21:26:05 UTC) #2
dmurph
lgtm, thanks for adding all of those other tests in leveldb_transaction.
3 years, 10 months ago (2017-02-22 23:08:34 UTC) #8
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/2708223002/1
3 years, 10 months ago (2017-02-22 23:26:56 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/339d49e89f42347c7b85ac31cb0e9ebd8163025d
3 years, 10 months ago (2017-02-23 01:19:20 UTC) #14
findit-for-me
FYI: Findit identified this CL at revision 452324 as the culprit for failures in the ...
3 years, 10 months ago (2017-02-23 03:28:17 UTC) #15
keishi
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2710203002/ by keishi@chromium.org. ...
3 years, 10 months ago (2017-02-23 09:38:32 UTC) #16
Marc Treib
On 2017/02/23 03:28:17, findit-for-me wrote: > FYI: Findit identified this CL at revision 452324 as ...
3 years, 10 months ago (2017-02-23 09:42:19 UTC) #17
Marc Treib
3 years, 10 months ago (2017-02-23 09:43:15 UTC) #18

Powered by Google App Engine
This is Rietveld 408576698