Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sync] Precompute UniquePosition in sync thread
The patch adopts the C++ class syncer::UniquePosition instead of the lower-level raw protocol buffer (sync_pb::UniquePosition) throughout various layers, most importantly syncer::EntityData. This has so many advantages that it's surprising that it wasn't done before: 1. Improves performance, possibly reducing UI jank, due to reducing the load on the UI thread for incoming updates. This is notable in BookmarkModelMerger, which relies on UniquePosition during sorting, and incurred in repeated computation of UniquePosition (which could worst-case, for old data, require compression operations). 2. Makes APIs more type safe by adopting higher-level abstractions. This is because operations like equality are not identical, depending on whether the underlying proto representation is used or the higher-level object. 3. Simplifies the implementation and unit tests, improving readability. Change-Id: I98a370ec17d32ac558d51ff7e4c9386496c3b5db Bug: 1205351 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2874301 Reviewed-by: Rushan Suleymanov <rushans@google.com> Commit-Queue: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#880305}
- Loading branch information
Mikel Astiz
authored and
Chromium LUCI CQ
committed
May 7, 2021
1 parent
aba21c0
commit 76073c4
Showing
21 changed files
with
109 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.