New issue
Advanced search Search tips

Issue 606685 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Investigate performance problems for 'Canvas suite > Canvas bouncing png images' benchmark

Project Member Reported by dk...@chromium.org, Apr 26 2016

Issue description

All benchmarks are under pr.gg/animometer/developer.html

- Set "Ramp" mode for benchmarking.
- Set "Keep at a fixed complexity" for profiling.  Set an appropriate [high] complexity next to each test's name.

File any performance bugs found as blocking this issue.
 

Comment 1 by dk...@chromium.org, Apr 27 2016

Owner: chrishtr@chromium.org
Status: Assigned (was: Untriaged)
Raster work, script execution, and browser compositor dominate when profiling
on a Z620 with a naive run. Now trying out various canvas acceleration settings
(display list canvas, display list canvas + ganesh, accelerated canvas), and
also trying on Android.
On Mac Canary, everything looks great, in terms of raster: canvas uses acceleration
and there is no raster work. GPU process work is < 1ms per frame in my particular test
run.

The main cost is v8 running script, which is ~7ms per frame. Digging into that...
...and as expected, a lot of the time in "v8" is actually spent in 
the implementations of methods like rotate, translate, etc. on CanvasRenderingContext2D, or in the v8 bindings.

I'm playing with BaseRenderingContext2D::{scale, translate, rotate} to see if
it's possible to optimize their matrix internals. 
Reducing the # of matrix copies doesn't seem to have much effect. Probably
things are limited by binding speed and speed of the underlying Skia backing of the methods.

Comment 6 by junov@chromium.org, May 4 2016

Components: Blink>Canvas
SIMD implementation of SkMatrix ops might help
Cc: fmalita@chromium.org
Components: Internals>Skia
Yeah. Has that been tried to your knowledge?
Cc: mtkl...@chormium.org
(re #6)

Comment 9 by dk...@chromium.org, May 18 2016

Did SIMD implementation end up being an effective option?
Owner: junov@chromium.org

Comment 11 by junov@chromium.org, May 18 2016

Owner: sebastienlc@google.com
Project Member

Comment 12 by bugdroid1@chromium.org, Jun 9 2016

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

commit c0a7ab42ca62bf097d879cc298ee1e97121463eb
Author: sebastienlc <sebastienlc@google.com>
Date: Thu Jun 09 22:36:19 2016

Added telemetry pages for the canvas element.

BUG=606687,606686,606685

Review-Url: https://codereview.chromium.org/2047773002
Cr-Commit-Position: refs/heads/master@{#399039}

[modify] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases.py
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_clipped_rectangles.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_clipped_rectangles.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_gradient_circles.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_gradient_circles.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_png_images.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_png_images.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_svg_images.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_svg_images.js
[modify] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_arcs.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_lines.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_lines.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_tough_cases_lib.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/fill_shapes.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/fill_shapes.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/images/Chromium_11_Logo.svg
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/put_get_image_data.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/put_get_image_data.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/stroke_shapes.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/stroke_shapes.js

Cc: -mtkl...@chormium.org mtklein@chromium.org
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 15 2016

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

commit c0a7ab42ca62bf097d879cc298ee1e97121463eb
Author: sebastienlc <sebastienlc@google.com>
Date: Thu Jun 09 22:36:19 2016

Added telemetry pages for the canvas element.

BUG=606687,606686,606685

Review-Url: https://codereview.chromium.org/2047773002
Cr-Commit-Position: refs/heads/master@{#399039}

[modify] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases.py
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_clipped_rectangles.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_clipped_rectangles.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_gradient_circles.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_gradient_circles.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_png_images.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_png_images.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_svg_images.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/bouncing_svg_images.js
[modify] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_arcs.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_lines.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_lines.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/canvas_tough_cases_lib.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/fill_shapes.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/fill_shapes.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/images/Chromium_11_Logo.svg
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/put_get_image_data.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/put_get_image_data.js
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/stroke_shapes.html
[add] https://crrev.com/c0a7ab42ca62bf097d879cc298ee1e97121463eb/tools/perf/page_sets/tough_canvas_cases/rendering_throughput/stroke_shapes.js

Comment 15 by junov@chromium.org, Jun 20 2016

Labels: -Pri-1 Pri-2
Project Member

Comment 16 by bugdroid1@chromium.org, Jul 20 2016

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

commit 98739b054a5b28cc607d688b2e9e582456bbb20e
Author: sebastienlc <sebastienlc@google.com>
Date: Wed Jul 20 16:48:12 2016

Improving canvas 2D performance by switching graphics rendering pipeline.

1. Functionality to switch from the accelerated (GPU) graphics pipeline
to the recording graphics pipeline.
2. Simple heuristic to determine when the pipeline switch would increase
performance based on how the canvas was used previously.
3. Automatically switch pipeline to increase performance based on the
heuristic if the enable-canvas-2d-dynamic-pipeline-mode-switching flag is enabled.

BUG=606687, 606686, 606685
TBR=grt@chromium.org

Review-Url: https://codereview.chromium.org/2141793002
Cr-Commit-Position: refs/heads/master@{#406585}

[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/chrome/app/generated_resources.grd
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/chrome/browser/about_flags.cc
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/chrome/browser/chromeos/login/chrome_restart_request.cc
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/content/child/runtime_features.cc
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/content/public/common/content_switches.cc
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/content/public/common/content_switches.h
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/third_party/WebKit/public/web/WebRuntimeFeatures.h
[modify] https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e/tools/metrics/histograms/histograms.xml

Project Member

Comment 17 by bugdroid1@chromium.org, Jul 29 2016

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

commit 4bc8c2ea186824137a5542b4fd98e226060f02df
Author: sebastienlc <sebastienlc@google.com>
Date: Fri Jul 29 18:53:16 2016

Improving the description of the dynamic rendering mode switching flag.

BUG=606687, 606686, 606685
TBR=grt@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2194963002
Cr-Commit-Position: refs/heads/master@{#408702}

[modify] https://crrev.com/4bc8c2ea186824137a5542b4fd98e226060f02df/chrome/app/generated_resources.grd

Owner: junov@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment