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

Issue 2779403002: Migrate jumplist update task from FILE thread to base/task_scheduler (Closed)

Created:
3 years, 8 months ago by chengx
Modified:
3 years, 8 months ago
Reviewers:
robliao, gab
CC:
chromium-reviews, robliao, fdoray
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Migrate jumplist update task from FILE thread to base/task_scheduler Currently, the jumplist update task is running on FILE thread, which can hang the FILE thread so that no other tasks can be running on this thread during that time. The FILE thread has been deprecated and it is preferred to base/task_scheduler/post_task.h for new classes requiring a background file I/O task runner. This CL does this migration for the jumplist update task. BUG=40407, 179576 Review-Url: https://codereview.chromium.org/2779403002 Cr-Commit-Position: refs/heads/master@{#462280} Committed: https://chromium.googlesource.com/chromium/src/+/971169a30d72887e285e03db2e524a6b3a15d3bb

Patch Set 1 #

Patch Set 2 : Use base::SingleThreadTaskRunner #

Patch Set 3 : Use CreateCOMSTATaskRunnerWithTraits. #

Total comments: 6

Patch Set 4 : Address comments. #

Total comments: 4

Patch Set 5 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -35 lines) Patch
M chrome/browser/win/jumplist.h View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/win/jumplist.cc View 1 2 3 8 chunks +23 lines, -26 lines 0 comments Download
M chrome/browser/win/jumplist_file_util.cc View 1 2 3 4 1 chunk +6 lines, -5 lines 0 comments Download

Messages

Total messages: 65 (48 generated)
chengx
Hi Gabriel, I tried to migrate the delete task from FILE thread to task_scheduler here, ...
3 years, 8 months ago (2017-03-30 01:31:26 UTC) #4
gab
On 2017/03/30 01:31:26, chengx wrote: > Hi Gabriel, I tried to migrate the delete task ...
3 years, 8 months ago (2017-04-03 14:25:10 UTC) #28
chengx
Using CreateCOMSTATaskRunnerWithTraits() instead of CreateSingleThreadTaskRunnerWithTraits() works! I think using some strategy to make this easier ...
3 years, 8 months ago (2017-04-03 23:58:12 UTC) #36
gab
On 2017/04/03 23:58:12, chengx wrote: > Using CreateCOMSTATaskRunnerWithTraits() instead of > CreateSingleThreadTaskRunnerWithTraits() works! I think ...
3 years, 8 months ago (2017-04-04 21:08:57 UTC) #39
gab
https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist.cc#newcode616 chrome/browser/win/jumplist.cc:616: FROM_HERE, base::Bind(&DeleteDirectoryAndLogResults, icon_dir_old, std::move(icon_dir_old) and #include <utilit> for std::move ...
3 years, 8 months ago (2017-04-04 21:11:46 UTC) #40
gab
https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist.cc#newcode616 chrome/browser/win/jumplist.cc:616: FROM_HERE, base::Bind(&DeleteDirectoryAndLogResults, icon_dir_old, On 2017/04/04 21:11:46, gab wrote: > ...
3 years, 8 months ago (2017-04-04 21:12:06 UTC) #41
chengx
PTAL~ https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist.cc#newcode616 chrome/browser/win/jumplist.cc:616: FROM_HERE, base::Bind(&DeleteDirectoryAndLogResults, icon_dir_old, On 2017/04/04 21:11:46, gab wrote: ...
3 years, 8 months ago (2017-04-05 00:23:24 UTC) #44
robliao
Drive by! https://codereview.chromium.org/2779403002/diff/140001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2779403002/diff/140001/chrome/browser/win/jumplist.cc#newcode608 chrome/browser/win/jumplist.cc:608: single_thread_task_runner_->PostTask( Is this expected to be called ...
3 years, 8 months ago (2017-04-05 00:27:50 UTC) #46
chengx
Hi Robert, please see my reply to your comments. Thanks! https://codereview.chromium.org/2779403002/diff/140001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2779403002/diff/140001/chrome/browser/win/jumplist.cc#newcode608 ...
3 years, 8 months ago (2017-04-05 03:25:50 UTC) #49
gab
lgtm w/ comment https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist_file_util.cc File chrome/browser/win/jumplist_file_util.cc (right): https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist_file_util.cc#newcode116 chrome/browser/win/jumplist_file_util.cc:116: UMA_HISTOGRAM_ENUMERATION("WinJumplist.DeleteStatusJumpListIconsOld", On 2017/04/05 00:23:24, chengx wrote: ...
3 years, 8 months ago (2017-04-05 20:53:27 UTC) #50
chengx
On 2017/04/05 20:53:27, gab wrote: > lgtm w/ comment > > https://codereview.chromium.org/2779403002/diff/120001/chrome/browser/win/jumplist_file_util.cc > File chrome/browser/win/jumplist_file_util.cc ...
3 years, 8 months ago (2017-04-05 22:40:27 UTC) #53
robliao
lgtm. https://codereview.chromium.org/2779403002/diff/140001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2779403002/diff/140001/chrome/browser/win/jumplist.cc#newcode608 chrome/browser/win/jumplist.cc:608: single_thread_task_runner_->PostTask( On 2017/04/05 20:53:27, gab wrote: > On ...
3 years, 8 months ago (2017-04-05 23:02:30 UTC) #54
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/2779403002/160001
3 years, 8 months ago (2017-04-05 23:34:59 UTC) #59
commit-bot: I haz the power
Committed patchset #5 (id:160001) as https://chromium.googlesource.com/chromium/src/+/971169a30d72887e285e03db2e524a6b3a15d3bb
3 years, 8 months ago (2017-04-05 23:56:53 UTC) #62
chengx
A revert of this CL (patchset #5 id:160001) has been created in https://codereview.chromium.org/2810853002/ by chengx@chromium.org. ...
3 years, 8 months ago (2017-04-10 17:53:05 UTC) #63
gab
On 2017/04/10 17:53:05, chengx wrote: > A revert of this CL (patchset #5 id:160001) has ...
3 years, 8 months ago (2017-04-10 18:07:51 UTC) #64
chengx
3 years, 8 months ago (2017-04-10 19:37:32 UTC) #65
Message was sent while issue was closed.
On 2017/04/10 18:07:51, gab wrote:
> On 2017/04/10 17:53:05, chengx wrote:
> > A revert of this CL (patchset #5 id:160001) has been created in
> > https://codereview.chromium.org/2810853002/ by
> https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=chengx@chromium.org.
> > 
> > The reason for reverting is: Both the new/old Canary versions are running
> > RunUpdateOnFileThread callback function significantly slower suddenly. While
> > this means this CL is irrelevant, I think it still should be reverted to see
> > what happens. This allows further investigation. .
> 
> This is expected per TaskPriority::BACKGROUND. You can use
> TaskPriority::USER_VISIBLE if you need those to complete in a user visible
> delay. It all depends on whether you want to add contention on the system for
> this or are happy with a delay on the icon update when the system is under
> contention (IMO the latter may be preferable -- what is "much" slower and at
> which percentiles?).

Thanks! Unfortunately, the confusion is beyond this. Please see the design doc,
page 11, the "Results [I am very confused]" for the whole story.

Powered by Google App Engine
This is Rietveld 408576698