DescriptionIndexedDB: 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 #Messages
Total messages: 18 (10 generated)
|