Sync: Avoid 3 passes over SyncDarta DB when loading the directory from the disk
According to profiling the first two read passes over SyncData DB are from DirectoryBackingStore::DropDeletedEntries. This function executes two SQL queries that drop entries pending deletion. Since it is uncommon to have entries pending deletion it is far more efficient to remove DirectoryBackingStore::DropDeletedEntries and instead check for the entries matching this criteria inside DirectoryBackingStore::LoadEntries, skip those entries from being loaded and put them straight into Directory's metahandles_to_purge collection which sets them up for deletion during a subsequent database save. See the bug for the preliminary performance results. BUG=464073 Review URL: https://codereview.chromium.org/1008103002 Cr-Commit-Position: refs/heads/master@{#320861}
Showing
Please register or sign in to comment