New issue
Advanced search Search tips

Issue 737079 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

PDF.js performance on chrome for non hardware accelerated canvas is better than on HWA one

Reported by vina...@gmail.com, Jun 27 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36

Steps to reproduce the problem:
1. Open the demo (https://mozilla.github.io/pdf.js/web/viewer.html) in chrome first with GPU 2d canvas acceleration on. Observe the scrolling performance
2. Now open the same demo with GPU 2d acceleration off (uses software rendering) and check the
performance. Shows noticeable difference and is smoother than GPU enabled counterpart.

What is the expected behavior?
PDF.js scrolling with HWA canvas on chrome should be as smooth as we have on non HWA canvas.

What went wrong?
Low FPS and scrolling with visual degradation.

Did this work before? N/A 

Chrome version: 59.0.3071.109  Channel: stable
OS Version: 14.04
Flash Version: 

PDF.JS uses canvas to render pdf pages in browser. In my actual application the pdf that i am rendering is relatively big (around 60 pages) and hence there are lot of canvases created. Of course pdf.js is smart enough to cache canvases and add/remove them smartly based on user's position in the page so at a time not more than 10-12 canvases are rendered in the DOM.

What i suspect from my dev tools profiling with HWA canvas is that there seems to more time taken transferring data from CPU to GPU and vice versa. I have very less understanding of GPU internals and hence it maybe amateur of me to make this claim.

Software rendering works great though and is smooth. Also the same demo works great with and without HWA on firefox.

I am not sure this is the correct place to post this issue as this concerns a specific library but the issue is being faced on chrome at the moment. I have managed to reproduce it on Windows as well. I have also opened a issue in pdf.js gitub repo @ https://github.com/mozilla/pdf.js/issues/8577
 

Comment 1 by vina...@gmail.com, Jun 27 2017

Let me know if i need to provide any more information for this issue.
Components: -Blink Internals>GPU
Labels: Needs-Triage-M59
Cc: junov@chromium.org
Components: -Internals>GPU Blink>Canvas
junov, can you take a look at this?

Comment 4 by junov@chromium.org, Jul 4 2017

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

Sign in to add a comment