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

Issue 2868303003: Cancel the next 10 updates if there's a timeout in jumplist updater (Closed)

Created:
3 years, 7 months ago by chengx
Modified:
3 years, 7 months ago
Reviewers:
gab, grt (UTC plus 2)
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Cancel the next 10 updates if there's a timeout in jumplist updater Notifying OS about the jumplist update consists of 4 steps in order: BeginUpdate, AddCustomCategory, AddTasks and CommitUpdate, all of which shouldn't take long. However, UMA data shows that each step can take up to tens of seconds for some users, especially for steps Beginupdate, AddCustomCategory and CommitUpdate. Since they are mostly Windows API calls, we can assume this is due to user machines (which can be very slow) with a pretty high confidence, and also there's not much we can improve on Chrome's side. Previously, we cancel the current jumplist update if BeginUpdate takes more than 500 ms, based on the assumption that the following steps will also take a long time if BeginUpdate does. The UMA data shows that this benefits some users but not the majority, which indicates that the runtime of these steps is not highly correlated. That is, AddCustomCategory and/or CommitUpdate can still take a long time even if BeginUpdate finishes quickly. To alleviate this issue, we should reduce the frequency of jumplist updates if any of those steps times out. In more details, we cancel the next 10 updates if BeginUpdate or AddCustomCategory takes more than 500 ms, or takes more than 500 ms, or CommitUpdate takes more than 1000 ms, which are the cutoffs for 99.5% JumpList update samples in Canary for the three steps, respectively. If the machine is always slow making every jumplist update time out, this penalty of cancelling the next 10 updates can alleviate this issue by 90%. BUG=40407, 179576 Review-Url: https://codereview.chromium.org/2868303003 Cr-Commit-Position: refs/heads/master@{#471430} Committed: https://chromium.googlesource.com/chromium/src/+/143d0a7278a1f2b6ff9173ec78e6755b7100704c

Patch Set 1 #

Total comments: 6

Patch Set 2 : Change int/bool logic to int logic only #

Total comments: 6

Patch Set 3 : Update comments and variable names #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -4 lines) Patch
M chrome/browser/win/jumplist.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/win/jumplist.cc View 1 2 6 chunks +50 lines, -4 lines 0 comments Download

Messages

Total messages: 42 (32 generated)
chengx
Hi Gabriel, PTAL this small change. Thanks! I've landed a (slightly) similar one as in ...
3 years, 7 months ago (2017-05-10 19:31:14 UTC) #8
gab
https://codereview.chromium.org/2868303003/diff/40001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2868303003/diff/40001/chrome/browser/win/jumplist.cc#newcode69 chrome/browser/win/jumplist.cc:69: constexpr int kCancelledUpdates = 10; Feels like we should ...
3 years, 7 months ago (2017-05-11 14:48:24 UTC) #18
chengx
Hi Gabriel, the see my reply to your comment below. Thanks! https://codereview.chromium.org/2868303003/diff/40001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): ...
3 years, 7 months ago (2017-05-11 16:41:43 UTC) #19
chengx
Adding grt@ for more feedback. Hi Gabriel, I've updated the CL description to better convey ...
3 years, 7 months ago (2017-05-12 05:55:28 UTC) #25
gab
Ok, let's try it if you think it will help https://codereview.chromium.org/2868303003/diff/40001/chrome/browser/win/jumplist.h File chrome/browser/win/jumplist.h (right): https://codereview.chromium.org/2868303003/diff/40001/chrome/browser/win/jumplist.h#newcode243 ...
3 years, 7 months ago (2017-05-12 17:58:47 UTC) #26
chengx
I've simplified the int/bool logic to int-only logic as suggested. PTAL, thanks! I've also tested ...
3 years, 7 months ago (2017-05-12 18:53:38 UTC) #30
gab
lgtm w/ comments https://codereview.chromium.org/2868303003/diff/80001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2868303003/diff/80001/chrome/browser/win/jumplist.cc#newcode69 chrome/browser/win/jumplist.cc:69: constexpr int kMaxUpdatesToSkip = 10; kUpdatesToSkipUnderHeavyLoad ...
3 years, 7 months ago (2017-05-12 19:00:00 UTC) #31
chengx
Thanks for the timely review! I've addressed all the comments in the new patch set. ...
3 years, 7 months ago (2017-05-12 19:23:58 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868303003/100001
3 years, 7 months ago (2017-05-12 20:21:32 UTC) #39
commit-bot: I haz the power
3 years, 7 months ago (2017-05-12 20:27:26 UTC) #42
Message was sent while issue was closed.
Committed patchset #3 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/143d0a7278a1f2b6ff9173ec78e6...

Powered by Google App Engine
This is Rietveld 408576698