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

Issue 8637006: [Sync] Make syncer commands avoid posting tasks on threads with no work to do (Closed)

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

Description

[Sync] Add framework for avoid posting tasks on threads with no work to do Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. Add HasCustomGroupsToChange() method to ModelChangingSyncerCommand and have all commands default to returning false to track down the perf regression introduced by the last couple of times this was landed (112178, 112815). BUG=97832 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112178 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112743 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112815 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113090

Patch Set 1 #

Patch Set 2 : Refactor some test code #

Total comments: 7

Patch Set 3 : Address comments, add tests #

Total comments: 7

Patch Set 4 : Address comments #

Patch Set 5 : Address comments #

Patch Set 6 : Speculative fix for perf regression #

Patch Set 7 : Fix tests #

Patch Set 8 : Add HasCustomGroupsToChange() and set everything to false #

Patch Set 9 : Sync to head, fix windows compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+860 lines, -104 lines) Patch
M chrome/browser/sync/engine/apply_updates_command.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/apply_updates_command.cc View 1 2 3 4 5 6 7 3 chunks +53 lines, -8 lines 0 comments Download
M chrome/browser/sync/engine/apply_updates_command_unittest.cc View 1 2 12 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/build_and_process_conflict_sets_command.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/build_and_process_conflict_sets_command_unittest.cc View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/model_changing_syncer_command.h View 1 2 3 4 5 6 7 2 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/model_changing_syncer_command.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -19 lines 0 comments Download
A chrome/browser/sync/engine/model_changing_syncer_command_unittest.cc View 1 2 3 4 5 6 7 1 chunk +80 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command.cc View 1 2 3 4 5 6 7 2 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command_unittest.cc View 1 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/process_updates_command.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/process_updates_command.cc View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/process_updates_command_unittest.cc View 1 2 7 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/resolve_conflicts_command.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/resolve_conflicts_command.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/resolve_conflicts_command_unittest.cc View 1 2 1 chunk +51 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/sync_scheduler.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/syncer_unittest.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/update_applicator.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/sync/engine/verify_updates_command.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/verify_updates_command.cc View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/verify_updates_command_unittest.cc View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller.cc View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.h View 1 2 3 4 5 chunks +16 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.cc View 1 2 3 4 5 chunks +87 lines, -5 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session_unittest.cc View 1 2 12 chunks +129 lines, -13 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 1 2 3 4 chunks +13 lines, -5 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 2 3 4 5 13 chunks +84 lines, -32 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_unittest.cc View 1 2 3 7 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/test/engine/syncer_command_test.h View 1 2 3 chunks +41 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
akalin
+tim for review I'm not completely done writing unit tests for these, but I wanted ...
9 years, 1 month ago (2011-11-22 05:43:34 UTC) #1
tim (not reviewing)
http://codereview.chromium.org/8637006/diff/2001/chrome/browser/sync/engine/model_changing_syncer_command.cc File chrome/browser/sync/engine/model_changing_syncer_command.cc (right): http://codereview.chromium.org/8637006/diff/2001/chrome/browser/sync/engine/model_changing_syncer_command.cc#newcode56 chrome/browser/sync/engine/model_changing_syncer_command.cc:56: active_groups.insert(it->second); First, GetActiveGroups belongs on the SyncSession class (it's ...
9 years, 1 month ago (2011-11-22 18:40:05 UTC) #2
akalin
Fixed all comments, PTAL. Also added a bunch of unit tests. I think we have ...
9 years, 1 month ago (2011-11-23 03:25:18 UTC) #3
commit-bot: I haz the power
No LGTM from valid reviewers yet.
9 years, 1 month ago (2011-11-23 04:53:44 UTC) #4
tim (not reviewing)
http://codereview.chromium.org/8637006/diff/2001/chrome/browser/sync/engine/model_changing_syncer_command.h File chrome/browser/sync/engine/model_changing_syncer_command.h (right): http://codereview.chromium.org/8637006/diff/2001/chrome/browser/sync/engine/model_changing_syncer_command.h#newcode41 chrome/browser/sync/engine/model_changing_syncer_command.h:41: // TODO(lipalani): |ModelChangingExecuteImpl| should return an On 2011/11/23 03:25:18, ...
9 years ago (2011-11-29 00:01:59 UTC) #5
akalin
Addressed all comments. PTAL. http://codereview.chromium.org/8637006/diff/6001/chrome/browser/sync/engine/apply_updates_command.cc File chrome/browser/sync/engine/apply_updates_command.cc (right): http://codereview.chromium.org/8637006/diff/6001/chrome/browser/sync/engine/apply_updates_command.cc#newcode33 chrome/browser/sync/engine/apply_updates_command.cc:33: for (syncable::Directory::UnappliedUpdateMetaHandles::const_iterator it = On ...
9 years ago (2011-11-30 01:33:03 UTC) #6
tim (not reviewing)
LGTM http://codereview.chromium.org/8637006/diff/6001/chrome/browser/sync/engine/process_updates_command.cc File chrome/browser/sync/engine/process_updates_command.cc (right): http://codereview.chromium.org/8637006/diff/6001/chrome/browser/sync/engine/process_updates_command.cc#newcode47 chrome/browser/sync/engine/process_updates_command.cc:47: return groups_with_verified_updates; On 2011/11/30 01:33:03, akalin wrote: > ...
9 years ago (2011-11-30 02:21:23 UTC) #7
akalin
> OK, yeah lets do that. Done. Checking in as soon as trybots pass.
9 years ago (2011-11-30 04:18:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/8637006/27001
9 years ago (2011-11-30 08:03:54 UTC) #9
commit-bot: I haz the power
Change committed as 112178
9 years ago (2011-11-30 09:45:28 UTC) #10
akalin
I think I figured out what was causing the perf regression, but not why. I ...
9 years ago (2011-12-02 18:16:43 UTC) #11
akalin
http://build.chromium.org/f/chromium/perf/mac-release-10.6/sync/report.html?history=150&rev=-1&graph=typed_urls Hmm, looks like my change doesn't regress autofill anymore, but it still regresses typed_urls.deletes. ...
9 years ago (2011-12-03 02:14:40 UTC) #12
akalin
On 2011/12/03 02:14:40, akalin wrote: > http://build.chromium.org/f/chromium/perf/mac-release-10.6/sync/report.html?history=150&rev=-1&graph=typed_urls > > Hmm, looks like my change doesn't ...
9 years ago (2011-12-05 19:15:27 UTC) #13
akalin
On 2011/12/05 19:15:27, akalin wrote: > On 2011/12/03 02:14:40, akalin wrote: > > > http://build.chromium.org/f/chromium/perf/mac-release-10.6/sync/report.html?history=150&rev=-1&graph=typed_urls ...
9 years ago (2011-12-05 19:19:58 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/8637006/42002
9 years ago (2011-12-05 22:28:36 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/8637006/41006
9 years ago (2011-12-05 22:34:01 UTC) #16
commit-bot: I haz the power
Can't process patch for file chrome/browser/sync/engine/model_changing_syncer_command.cc. File's status is None, patchset upload is incomplete.
9 years ago (2011-12-05 22:34:15 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/8637006/42002
9 years ago (2011-12-05 22:39:33 UTC) #18
commit-bot: I haz the power
9 years ago (2011-12-05 23:48:06 UTC) #19

Powered by Google App Engine
This is Rietveld 408576698