Chromium Code Reviews
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 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 #Messages
Total messages: 18 (12 generated)
|