New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 782813 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug-Regression



Sign in to add a comment

32.9% regression in blink_perf.canvas at 514117:514291

Project Member Reported by rmcilroy@chromium.org, Nov 8 2017

Issue description

See the link to graphs below.
 
All graphs for this bug:
  https://chromeperf.appspot.com/group_report?bug_id=782813

(For debugging:) Original alerts at time of bug-filing:
  https://chromeperf.appspot.com/group_report?sid=e643322dbea31776b902a1602ba5f0d990a51b606e01c24044f9282582f7043b


Bot(s) for this bug's original alert(s):

android-webview-nexus6
Cc: zakerinasab@chromium.org
Owner: zakerinasab@chromium.org
Status: Assigned (was: Untriaged)

=== Auto-CCing suspected CL author zakerinasab@chromium.org ===

Hi zakerinasab@chromium.org, the bisect results pointed to your CL, please take a look at the
results.


=== BISECT JOB RESULTS ===
Perf regression found with culprit

Suspected Commit
  Author : Reza.Zakerinasab
  Commit : 9dd181e41920a8779bdb532a987851a260088889
  Date   : Mon Nov 06 22:04:53 2017
  Subject: Refactor ImageBitmap from ImageData code path

Bisect Details
  Configuration: android_webview_nexus6_aosp_perf_bisect
  Benchmark    : blink_perf.canvas
  Metric       : createImageBitmapFromImageData/createImageBitmapFromImageData
  Change       : 32.52% | 79.1885460816 -> 53.4375352061

Revision             Result                   N
chromium@514116      79.1885 +- 0.518609      6      good
chromium@514204      79.0705 +- 1.94904       6      good
chromium@514248      79.1155 +- 0.969978      6      good
chromium@514251      79.0817 +- 1.39828       6      good
chromium@514252      78.8517 +- 1.37811       6      good
chromium@514253      53.119 +- 0.253318       6      bad       <--
chromium@514254      53.401 +- 0.828348       6      bad
chromium@514259      53.0815 +- 0.72579       6      bad
chromium@514270      53.4423 +- 1.39029       6      bad
chromium@514291      53.4375 +- 1.49968       6      bad

Please refer to the following doc on diagnosing blink_perf regressions:
  https://chromium.googlesource.com/chromium/src/+/master/docs/speed/benchmark_harnesses/blink_perf.md

To Run This Test
  src/tools/perf/run_benchmark -v --browser=android-webview --output-format=chartjson --upload-results --pageset-repeat=1 --also-run-disabled-tests blink_perf.canvas

More information on addressing performance regressions:
  http://g.co/ChromePerformanceRegressions

Debug information about this bisect:
  https://chromeperf.appspot.com/buildbucket_job_status/8963468077046119552


For feedback, file a bug with component Speed>Bisection
Cc: junov@chromium.org
Status: Started (was: Assigned)
It seems that the CL causes perf regression on Android, Windows and Linux but improves the performance on Mac (see graphs attached). Investigating.
createImageBitmapFromImageData.png
392 KB View Download
Cc: fs...@chromium.org
Components: Blink>Canvas
Investigating the perf regression, the only culprit that I was able to find is that due to removing the extra copy of ImageData, now we have to preserve the state of ImageData in ImageDataInCanvasColorSettings(). This requires further operations like doing swizzling twice.
Fixing some cropping branch conditions can retrieve ~10% of lost performance. There are other things that can be done (like using SkImageFilter on the constructed image instead of swizzling the ImageData in place), but I would like to try them after a related CL (https://chromium-review.googlesource.com/c/chromium/src/+/759116) is landed.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/631c8af14ad6ba6de908a418dc7f2b640204995c

commit 631c8af14ad6ba6de908a418dc7f2b640204995c
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Tue Nov 14 19:17:07 2017

Fix branch condition for the crop code in ImageData

This change fixes the branch condition for the crop code in ImageData. This is a
partial solution for createImageBitmap from ImageData  perf regression bug.

Bug:  782813 
Change-Id: I50c6924b30c1a1d7eb69d5b59123d896a326b772
Reviewed-on: https://chromium-review.googlesource.com/767331
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516379}
[modify] https://crrev.com/631c8af14ad6ba6de908a418dc7f2b640204995c/third_party/WebKit/Source/core/html/ImageData.cpp

49.6% regression in blink_perf.canvas at 517853:517904: https://bugs.chromium.org/p/chromium/issues/detail?id=787811
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02dbe866ad7f51475007f46673253ed934179529

commit 02dbe866ad7f51475007f46673253ed934179529
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Mon Dec 04 21:55:48 2017

Address canvas perf regressions in createImageBitmapFromImageData

This change tries to address the perf regression reported for
createImageBitmapFromImageData canvas perf test. This change performs
the premul operation in ImageData in advance, instead of doing that after
creating the ImageBitmap. This has resulted in ~60% perf improvement
on the local Linux machine, so it hopefully must address the regressions.

Bug:  782813 , 787772 , 787811 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If0f02d99677348d49cc9d16e910113b4250afb69
Reviewed-on: https://chromium-review.googlesource.com/802855
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521476}
[modify] https://crrev.com/02dbe866ad7f51475007f46673253ed934179529/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/02dbe866ad7f51475007f46673253ed934179529/third_party/WebKit/Source/core/html/ImageData.h
[modify] https://crrev.com/02dbe866ad7f51475007f46673253ed934179529/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.cpp
[modify] https://crrev.com/02dbe866ad7f51475007f46673253ed934179529/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.h
[modify] https://crrev.com/02dbe866ad7f51475007f46673253ed934179529/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h

Status: Fixed (was: Started)

Sign in to add a comment