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

Issue 836883 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Very slow texture uploads with 2D canvas + Intel

Project Member Reported by junov@chromium.org, Apr 25 2018

Issue description

This issue is being filed on behalf of good game studios.
Attached is a reduced test case that illustrates the performance issue as well as a trace that was captured on a Windows7 machine with an Intel HD4600 GPU. The other attachment is the "chrome://gpu" page of the machine where the bug was reproduced.

Steps to reproduce:
* install nodejs (googlers: do a moma search to find instructions)
* Extract the contents of canvasLag.tar.gz to a test directory
* In the test directory, run "npm install"
* In the test directory, run "npm start"
* In Chrome, load the URL printed by the npm start command
* Click the switch farm button repeatedly

Observation: animation lags when clicking switch farm

It is a bit laggy on all machines, which is expected, but it is extremely laggy on Intel HD4600 GPU.

This is apparently a recent-ish regression. Small texture uploads are taking >60ms.  On my machine (stock HP z840/nVidia) the same texture uploads take less than 1ms.  The code path doing the texture uploads has changed recently.  They used to be performed by skia, using TexImage2D, now the upload are performed by cc's gpu image cache using PostSubBufferCHROMIUM.

Hypothesis: Perhaps this new texture upload path is triggering a performance issue in the graphics driver.

REason for Restrict-view: attachments contain good game studios's code. 
 
canvasLag.tar.gz
3.1 MB Download
trace_canvasLag.json.gz
2.7 MB Download
gpu.htm
111 KB View Download

Comment 1 by junov@chromium.org, Apr 25 2018

Cc: junov@google.com tpreetz-...@goodgamestudios.com zz...@goodgamestudios.com rconstan...@goodgamestudios.com dwill...@goodgamestudios.com tschra...@goodgamestudios.com boczu...@goodgamestudios.com

Comment 2 by junov@chromium.org, Apr 26 2018

Labels: -Restrict-View-Google allpublic
Uploading new version of repro case, for removing restrict view flag.
canvasLag_copyright.tar.gz
2.4 MB Download

Comment 3 by junov@chromium.org, Apr 26 2018

Labels: -Pri-3 Pri-2
Cc: sunn...@chromium.org khushals...@chromium.org
Labels: Needs-Bisect
Owner: junov@chromium.org
Looked at the trace in the first comment. This doesn't look related to image uploading to me. The PostSubBufferCHROMIUM commands are from the display compositor context, and are used for the final display buffer swap. We are blocked on the swap for some reason, its taking ~40 ms for some cases. The main thread offscreen context used by the canvas is taking only 2ms in most cases.

junov@, if this is a recent regression, we could get a bisect. Which version did this regress on?

Comment 5 by junov@chromium.org, Apr 30 2018

People from Good Game Studios reported that this was happening since Chrome 60.  I was unable to bisect because I don't have access to a machine that reproduces the bug.

Comment 6 by junov@chromium.org, Apr 30 2018

@ggs: Any news on whether this is still reproducible with up to date Intel graphics drivers?
Cc: sindhu.chelamcherla@chromium.org
Labels: Triaged-ET Needs-Feedback
Unable to reproduce this issue on 65.0.3325.181, on latest stable 66.0.3359.139 and on latest canary 68.0.3416.0 using Windows 10 surface pro , Intel driver. Checked the issue as per steps mentioned in comment#0 and installed npm from http://blog.teamtreehouse.com/install-node-js-npm-windows. Attaching screencast and gpu details.

@junov: Could you please check the video and let us know if we miss anything. 

Thanks!
836883 (1).mp4
23.6 MB Download
gpu.htm
111 KB View Download

Comment 9 by junov@chromium.org, May 2 2018

Cc: api...@goodgamestudios.com
It is possible that the bug is Win7-specific
Owner: ----
Status: Available (was: Assigned)
@junov We installed the newest Intel GPU drivers for Intel 4600 GPU here is some specific info from our IT Admins

"I have installed the most recent drivers, but however, it has the version 10.18.14.4889 and is from 14. Dec. 2017.
The driver file itself is from the intel driver packed with version Number 15.36.34.4889.
I had to manually just update the driver file for the graphics adapter through the windows device manager."

The issue is still reproducible with the newly installed drivers.

And to answer the second question: "It is possible that the bug is Win7-specific". We have a reason to believe so. On one of our affected PCs with Intel 2500 GPU after updating from Win7 to Win10 the issue has disappeared.

Sign in to add a comment