Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1080)

Issue 6588119: First-time sync: asymptotic running time improvement (Closed)

Created:
9 years, 9 months ago by ncarter (slow)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Raghu Simha, Paweł Hajdan Jr., idana, akalin, tim (not reviewing)
Visibility:
Public.

Description

sync: Optimize GetFirstChildId and ComputePrevIdFromServerPosition by having the parent/child index be sorted by SERVER_POSITION_IN_PARENT, rather than arbitrarily. This fixes two longstanding TODOs and yields the following perf improvement on "SyncerTest.OneBajillionUpdates": Release build (7000ms -> 500ms) Debug build (70000ms -> 3000ms) BUG=60236, chromium-os:11226 TEST=sync_unit_tests (SyncerPosition* gives good coverage) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76700

Patch Set 1 #

Patch Set 2 : Readability improvements. #

Patch Set 3 : Self-review fixes. #

Patch Set 4 : Revert some unrelated diffs. #

Patch Set 5 : Fix unit_tests #

Total comments: 4

Patch Set 6 : Fix lexicographic-successor bug. #

Patch Set 7 : Fix test bug. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -189 lines) Patch
M chrome/browser/sync/engine/process_commit_response_command.cc View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncer_unittest.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/sync/engine/syncer_util.h View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/sync/engine/syncer_util.cc View 3 chunks +3 lines, -62 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_autofill_unittest.cc View 1 2 3 4 3 chunks +3 lines, -7 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 1 6 chunks +38 lines, -11 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 2 3 4 5 9 chunks +177 lines, -89 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_id.h View 1 2 3 4 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_id.cc View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_id_unittest.cc View 1 2 3 4 5 6 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
ncarter (slow)
Hi Nicolas, Please review.
9 years, 9 months ago (2011-03-02 17:11:19 UTC) #1
tim (not reviewing)
On 2011/03/02 17:11:19, ncarter wrote: > Hi Nicolas, > > Please review. awesome drive-by: base ...
9 years, 9 months ago (2011-03-02 17:17:57 UTC) #2
Nicolas Zea
http://codereview.chromium.org/6588119/diff/6001/chrome/browser/sync/syncable/syncable.cc File chrome/browser/sync/syncable/syncable.cc (right): http://codereview.chromium.org/6588119/diff/6001/chrome/browser/sync/syncable/syncable.cc#newcode1628 chrome/browser/sync/syncable/syncable.cc:1628: GetParentChildIndexUpperBound(lock, parent_id); The first candidate will actually have parent_id+1, ...
9 years, 9 months ago (2011-03-02 22:58:01 UTC) #3
ncarter (slow)
http://codereview.chromium.org/6588119/diff/6001/chrome/browser/sync/syncable/syncable.cc File chrome/browser/sync/syncable/syncable.cc (right): http://codereview.chromium.org/6588119/diff/6001/chrome/browser/sync/syncable/syncable.cc#newcode1628 chrome/browser/sync/syncable/syncable.cc:1628: GetParentChildIndexUpperBound(lock, parent_id); On 2011/03/02 22:58:02, nzea wrote: > The ...
9 years, 9 months ago (2011-03-02 23:58:16 UTC) #4
Nicolas Zea
Once you figure out the bug and trybots pass, LGTM
9 years, 9 months ago (2011-03-03 00:15:58 UTC) #5
ncarter (slow)
9 years, 9 months ago (2011-03-03 02:03:55 UTC) #6
On 2011/03/03 00:15:58, nzea wrote:
> Once you figure out the bug and trybots pass, LGTM

Found the bug; I've updated syncable_id.cc and added a unittest to
syncable_id_unittest.cc .  Will submit once trybots are all green.

Powered by Google App Engine
This is Rietveld 408576698