[Sync] Optimize position calculation for bookmarks during remote update
ComputeChildNodeIndex performs linear search to find appropriate index for the updated or created remote bookmark node. It might lead to quadratic time during some updates. In practice, this only affects huge quantities of local bookmarks and updates. This CL changes the algorithm to logarithmic search. Bug: 1084150 Change-Id: I605228ad4cd7db82a1e6777a5f4b35538783dde7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336084 Commit-Queue: Rushan Suleymanov <rushans@google.com> Reviewed-by:Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#795019}
Showing
Please register or sign in to comment