New issue
Advanced search Search tips

Issue 867418 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Chrome PNG decompression slower than IE11/Edge

Reported by ydor...@gmail.com, Jul 25

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
Unzip and run the attached tester, or navigate to https://algotec.github.io/test-png-decompress/
Click 'Run Test' and wait for the results. 
Compare Chrome to IE11, Edge, Firefox and Safari.
The tester:
1. Loads 100 images as blobs using XHR and creates object URL's
2. Creates Image objects and loads each with the blob URL, using img.src = URL. 
3. Draws each image to a canvas using context.drawImage
4. calculate the average time it takes to performs steps (2) and (3)

What is the expected behavior?
We expect Chrome to provide similar or better performance of image creation, decompress and draw as other browsers. 

What went wrong?
calling img.src = <blob URL> is consistently slower in Chrome when comparing to all other browsers (2-3 times slower)

calling context.drawImage is consistently slower in Chrome when comparing to IE11 and Edge (about 2 times slower). Chrome is faster than Firefox and Safari by 20-50%. Developer tools show that most of the time is spent in "Decoding Image" which we assume is PNG decompression.

These results are consistent through different CPU & GPU hardware and different operating systems. See attached excel file.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 67.0.3396.99  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 
test-png-decompress.zip
224 KB Download
png-decompress-test.xlsx
10.7 KB Download
Components: -Blink>Image Blink>Canvas Internals>Images>Codecs Internals>Compositing>Images
Not sure who owns this, as it is presented as 2 different issues.
Labels: Needs-Triage-M67
Should I split this to 2 different issues?
Labels: Triaged-ET Target-70 M-70 FoundIn-70 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.13.3, Win-10 and Ubuntu 14.04 using chrome reported version #68.0.3440.75 and latest canary #70.0.3507.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Cc: scro...@google.com cblume@chromium.org
scroggo@/cblume@ could probably see if there is any optimization opportunity in our png decoding.
Cc: fs...@chromium.org
Components: -Blink>Canvas
This is probably not Canvas specific, given that most of the time is spent on decoding.

Owner: scroggo@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment