Calling getContext on canvas element is very slow
Reported by
levani9...@gmail.com,
Oct 12
|
|||||||
Issue descriptionUserAgent: 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:
,
Oct 14
,
Oct 15
Could you please try to reproduce this in incognito mode (i.e., without any extensions).
,
Oct 15
Tried incognito mode and same result.
,
Oct 15
Could you attach your chrome://gpu please?
,
Oct 15
Done
,
Oct 15
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
,
Oct 15
,
Oct 15
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 |
|||||||
Comment 1 by bokan@chromium.org
, Oct 12