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

Issue 8533024: sync: Use a single transaction in ProcessUpdates rather than one per entry. (Closed)

Created:
9 years, 1 month ago by tim (not reviewing)
Modified:
9 years, 1 month ago
Reviewers:
rlarocque
CC:
chromium-reviews, Raghu Simha, ncarter (slow)
Visibility:
Public.

Description

sync: Use a single transaction in ProcessUpdates rather than one per entry. BUG=104203 TEST=compare 'Entries' count on about:sync to number of SyncThread>SyncThread Notify tasks in tracker2/profiler. The entries count should be much smaller. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110138

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -10 lines) Patch
M chrome/browser/sync/engine/process_updates_command.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/process_updates_command.cc View 4 chunks +9 lines, -9 lines 1 comment Download

Messages

Total messages: 7 (0 generated)
tim (not reviewing)
9 years, 1 month ago (2011-11-15 00:45:12 UTC) #1
rlarocque
Hooray! This should lead to a drastic reduction in the number or lock acquisitions done ...
9 years, 1 month ago (2011-11-15 00:52:23 UTC) #2
tim (not reviewing)
On 2011/11/15 00:52:23, rlarocque wrote: > Hooray! This should lead to a drastic reduction in ...
9 years, 1 month ago (2011-11-15 01:14:19 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/8533024/1
9 years, 1 month ago (2011-11-15 17:58:07 UTC) #4
commit-bot: I haz the power
Change committed as 110138
9 years, 1 month ago (2011-11-15 19:15:04 UTC) #5
akalin
On 2011/11/15 19:15:04, I haz the power (commit-bot) wrote: > Change committed as 110138 Just ...
9 years, 1 month ago (2011-11-15 19:33:28 UTC) #6
rlarocque
9 years, 1 month ago (2011-11-15 20:28:06 UTC) #7
On 2011/11/15 19:33:28, akalin wrote:
> On 2011/11/15 19:15:04, I haz the power (commit-bot) wrote:
> > Change committed as 110138
> 
> Just one question.  Would this still be desirable without the
> ThreadSafeObserverList problem?  Reducing lock overhead is nice, but the
> tradeoff is that we hold the lock for longer periods.  Won't that lead to
jank? 
> Or is it okay because there's no IO involved?

That's a question only profiling can answer.  I'm working on instrumenting the
sync code to give us more visibility into the trade-offs involved.  

I did some naive calculations based on traces of the current code.  Your concern
may be justified, but it all depends on how much of the current costs of a
ProcessUpdates transaction is due to overhead and how much is actually spent
processing updates.  I'll get back to you when I've taken a look at the numbers
after Tim's patch.  

There's a lot of low-hanging fruit in the directory (ie. ScopedKernelLock, the
std::set<std::string>-based node lookups, etc.).  If it's actually taking 10s of
microseconds to perform the update, then we should optimize that code.  There's
no reason for it to be so expensive.  

> 
> And shouldn't it be "the entries count should be much larger" in the TEST
> description? (although it's too late now)

Powered by Google App Engine
This is Rietveld 408576698