|
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
Committed: https://crrev.com/a3ed68bbb72ec9fdf16d866f41cb0951d006088b
Cr-Commit-Position: refs/heads/master@{#320861}
Total comments: 1
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+188 lines, -75 lines) |
Patch |
 |
M |
sync/syncable/deferred_on_disk_directory_backing_store.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/deferred_on_disk_directory_backing_store.cc
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/syncable/deferred_on_disk_directory_backing_store_unittest.cc
|
View
|
|
6 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory.h
|
View
|
1
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory.cc
|
View
|
|
3 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory_backing_store.h
|
View
|
|
2 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory_backing_store.cc
|
View
|
|
3 chunks |
+17 lines, -18 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory_backing_store_unittest.cc
|
View
|
|
7 chunks |
+30 lines, -17 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory_unittest.cc
|
View
|
1
2
|
1 chunk |
+81 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/in_memory_directory_backing_store.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/in_memory_directory_backing_store.cc
|
View
|
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/invalid_directory_backing_store.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/invalid_directory_backing_store.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/mutable_entry.cc
|
View
|
1
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/on_disk_directory_backing_store.h
|
View
|
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/on_disk_directory_backing_store.cc
|
View
|
|
4 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
sync/test/test_directory_backing_store.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/test/test_directory_backing_store.cc
|
View
|
|
2 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
Total messages: 10 (3 generated)
|