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

Issue 2824883006: [ash-md] Reduce thread hopping for cheap wallpaper color extraction. (Closed)

Created:
3 years, 8 months ago by bruthig
Modified:
3 years, 8 months ago
Reviewers:
Mark P, bshe, Evan Stade
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[ash-md] Reduce thread hopping for cheap wallpaper color extraction. Recent optimizations to the color_analysis::CalculateProminentColorOfBitmap() has made it more expensive to perform color extraction asynchronously in some cases. This change uses a simple image size heuristic to decide whether to extract colors synchronously or asynchronously. The optimizations made the 0-3 minute scale for the 'Ash.Wallpaper.TimeSpentExtractingColors' histogram overkill so it was replaced with 'Ash.Wallpaper.ColorExtraction.Durations' one which uses a 0-10 second scale. This change also includes a new 'Ash.Wallpaper.ColorExtraction.UserDelay' histogram that includes the thread switching delays incurred by asynchronous calculations. BUG=595010, 712714 TEST=components_unittests --gtest_filter=*WallPaperColorCalculator*yncTest* Review-Url: https://codereview.chromium.org/2824883006 Cr-Commit-Position: refs/heads/master@{#467075} Committed: https://chromium.googlesource.com/chromium/src/+/e4135c8d12a6554d16e3bf16a8b79bb6462aa7d8

Patch Set 1 #

Total comments: 11

Patch Set 2 : Addressed patch set 1 comments. #

Patch Set 3 : Removed 'BooleanSynchronous' from histograms.xml. #

Total comments: 10

Patch Set 4 : Addressed patch set 3 comments. #

Total comments: 8

Patch Set 5 : Merge branch 'master' into ash_wallpaper_timespentextractingcolors #

Patch Set 6 : Addressed patch set 4 comments. #

Total comments: 7

Patch Set 7 : Addressed comments from patch set patch set 6. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -43 lines) Patch
M components/wallpaper/wallpaper_color_calculator.h View 1 2 3 4 5 4 chunks +8 lines, -6 lines 0 comments Download
M components/wallpaper/wallpaper_color_calculator.cc View 1 2 3 4 5 3 chunks +51 lines, -11 lines 0 comments Download
M components/wallpaper/wallpaper_color_calculator_unittest.cc View 1 2 3 4 5 6 9 chunks +117 lines, -25 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 2 chunks +27 lines, -1 line 0 comments Download

Messages

Total messages: 40 (25 generated)
bruthig
Evan, can you take a first look before I send it to OWNERs?
3 years, 8 months ago (2017-04-18 21:25:07 UTC) #5
Evan Stade
nit: I don't think the histogram change is a side effect, it's a desired change ...
3 years, 8 months ago (2017-04-19 13:44:31 UTC) #8
bruthig
Evan, Can you take another look? On 2017/04/19 13:44:31, Evan Stade wrote: > nit: I ...
3 years, 8 months ago (2017-04-19 15:15:53 UTC) #12
Evan Stade
https://codereview.chromium.org/2824883006/diff/40001/components/wallpaper/wallpaper_color_calculator.cc File components/wallpaper/wallpaper_color_calculator.cc (right): https://codereview.chromium.org/2824883006/diff/40001/components/wallpaper/wallpaper_color_calculator.cc#newcode21 components/wallpaper/wallpaper_color_calculator.cc:21: // color. nit: perhaps explain the motivation briefly, e.g. ...
3 years, 8 months ago (2017-04-20 21:37:15 UTC) #13
Evan Stade
https://codereview.chromium.org/2824883006/diff/1/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2824883006/diff/1/tools/metrics/histograms/histograms.xml#newcode2281 tools/metrics/histograms/histograms.xml:2281: + The asynchronous time taken to extract colors from ...
3 years, 8 months ago (2017-04-20 21:37:44 UTC) #14
bruthig
bshe@, can you PTAL? mpearson@, can you take a look at the histogram usage in: ...
3 years, 8 months ago (2017-04-21 15:42:09 UTC) #18
Evan Stade
https://codereview.chromium.org/2824883006/diff/60001/components/wallpaper/wallpaper_color_calculator_unittest.cc File components/wallpaper/wallpaper_color_calculator_unittest.cc (right): https://codereview.chromium.org/2824883006/diff/60001/components/wallpaper/wallpaper_color_calculator_unittest.cc#newcode67 components/wallpaper/wallpaper_color_calculator_unittest.cc:67: canvas.FillRect(gfx::Rect(size), kGray); nitty nit nit: canvas.DrawColor(kGray); https://codereview.chromium.org/2824883006/diff/60001/components/wallpaper/wallpaper_color_calculator_unittest.cc#newcode143 components/wallpaper/wallpaper_color_calculator_unittest.cc:143: EXPECT_FALSE(calculator_->StartCalculation()); ...
3 years, 8 months ago (2017-04-21 16:57:10 UTC) #21
Mark P
histograms.xml lgtm
3 years, 8 months ago (2017-04-21 22:01:44 UTC) #22
bruthig
estade@, take another look if you wish, but not required. bshe@, can you PTAL? https://codereview.chromium.org/2824883006/diff/60001/components/wallpaper/wallpaper_color_calculator_unittest.cc ...
3 years, 8 months ago (2017-04-25 14:56:13 UTC) #25
Evan Stade
https://codereview.chromium.org/2824883006/diff/100001/components/wallpaper/wallpaper_color_calculator.cc File components/wallpaper/wallpaper_color_calculator.cc (right): https://codereview.chromium.org/2824883006/diff/100001/components/wallpaper/wallpaper_color_calculator.cc#newcode29 components/wallpaper/wallpaper_color_calculator.cc:29: // NOTE: |image| is intentionally a copy to ensure ...
3 years, 8 months ago (2017-04-25 16:24:39 UTC) #28
bshe
On 2017/04/25 16:24:39, Evan Stade wrote: > https://codereview.chromium.org/2824883006/diff/100001/components/wallpaper/wallpaper_color_calculator.cc > File components/wallpaper/wallpaper_color_calculator.cc (right): > > https://codereview.chromium.org/2824883006/diff/100001/components/wallpaper/wallpaper_color_calculator.cc#newcode29 ...
3 years, 8 months ago (2017-04-25 18:10:20 UTC) #29
bruthig
Sending to CQ... estade@, take a look if you wish but I believe I did ...
3 years, 8 months ago (2017-04-25 18:16:41 UTC) #32
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/2824883006/120001
3 years, 8 months ago (2017-04-25 18:17:12 UTC) #36
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/e4135c8d12a6554d16e3bf16a8b79bb6462aa7d8
3 years, 8 months ago (2017-04-25 19:28:06 UTC) #39
Evan Stade
3 years, 8 months ago (2017-04-25 22:33:10 UTC) #40
Message was sent while issue was closed.
On 2017/04/25 18:16:41, bruthig wrote:
> stuff

all good, thanks for updates

Powered by Google App Engine
This is Rietveld 408576698