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

Issue 894877 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
OOO until 2019-01-24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocked on:
issue 681341



Sign in to add a comment

Calling getContext on canvas element is very slow

Reported by levani9...@gmail.com, Oct 12

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Example URL:
https://www.messenger.com

Steps to reproduce the problem:
1. Open a web page that uses getContext function
2. 
3. 

What is the expected behavior?
Calling this function should not freeze the web page for several seconds.

What went wrong?
Calling this function blocks the ui and the tab get frozen for sevaral secons. This lasts at least 4-5 secons on average.

I notices this on messenger.com and made a quick performance recording (see attached image)

This is the code that actually causes the problem:

var a = document.createElement("canvas");
            return Boolean(window.WebGLRenderingContext) && Boolean(a.getContext("webgl") || a.getContext("experimental-webgl"))

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 69.0.3497.100  Channel: stable
OS Version: OS X 10.14.0
Flash Version:
 
getcontext.png
395 KB View Download
Components: -Blink Blink>Canvas
Labels: Needs-Triage-M69
Cc: fs...@chromium.org
Could you please try to reproduce this in incognito mode (i.e., without any extensions).
Tried incognito mode and same result.
Labels: Needs-Feedback
Could you attach your chrome://gpu please?
Done
gpu.html
405 KB View Download
Project Member

Comment 7 by sheriffbot@chromium.org, Oct 15

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink>Canvas Blink>WebGL Internals>GPU
Status: Untriaged (was: Unconfirmed)
Blockedon: 681341
Cc: ccameron@chromium.org
Owner: kbr@chromium.org
Status: Assigned (was: Untriaged)
This is a 2012-era MacBook Pro with dual Intel and NVIDIA GPUs. Integrated-to-discrete GPU switching at the OS level is very slow on this configuration.

Submitter, as a workaround you can launch Chrome from the command line with the command line argument:
  --force_integrated_gpu

We need to do more work to keep WebGL canvases on the integrated GPU in more situations on these dual-GPU MacBook Pros.

Sign in to add a comment