Descriptionsync: Count nodes more efficiently
The GetTotalNodesCount() function is called sufficiently often that it
makes sense to spend some effort optimizing its implementation.
The current implementation uses some traversal functions that are fairly
slow, especially since GetSuccessorId() was made more expensive by the
implementation of UniquePositions.
This change moves the implementation into the syncable::Directory. This
allows it to take advantage of the Directory's internal data structures
and avoid unnecessary lookups.
BUG=248143, 238621
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202973
Patch Set 1 #Patch Set 2 : Non-recursive version #Patch Set 3 : Remove cbegin/cend references to fix compile #
Total comments: 7
Patch Set 4 : Implement suggestions from review #
Messages
Total messages: 7 (0 generated)
|