Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue while rendering PDF #3448

Closed
samdemo opened this issue Jul 8, 2013 · 17 comments
Closed

Performance issue while rendering PDF #3448

samdemo opened this issue Jul 8, 2013 · 17 comments

Comments

@samdemo
Copy link

samdemo commented Jul 8, 2013

PDF rendering is very slow
Actual:

  1. It takes long time to render/load for the first time.
  2. When i try to use Zoom In/Out operation it takes time to redraw.

Expected:

  1. Fast loading of PDF
  2. Fast redrawing of PDF when Zoom In/Out operation is used.
@Snuffleupagus
Copy link
Collaborator

In order for anyone to be able to look into this issue, you have to provide more information about the problem you are experiencing:

  • First of all, please provide a link to a PDF file exhibiting these issues.
  • Secondly, you need to provide information regarding your configuration, for example: Operating system, browser and PDF.js version.
    (If you are using Firefox, it's also a good idea to include a copy of the "Graphics" section from about:support.)

@samdemo
Copy link
Author

samdemo commented Jul 8, 2013

PDF.js Version : 0.8.291
OS: windows XP
I have loaded PDF using file parameter.
It takes time while loading PDF first time and also takes time to reload/redraw when using zoom operation.
I have tested on
FireFox 22.0
Chrome 27.0.1453.116 m
Safari 5.1.7(windows)
issue behaves same on all the mentioned browser , is there any optimized way to solve this issue?
i request u to suggest me any solution.

@timvandermeij
Copy link
Contributor

It's hard to look into this if we do not have the PDF file that's causing you trouble. Could you post a link to the PDF file that is slow for you?

@samdemo
Copy link
Author

samdemo commented Jul 9, 2013

Hi,
I m trying following PDF:
http://cita.disability.uiuc.edu/presentations/pdf/examples/scanned_example_1.pdf
I have compared the other PDF and also PDF which is in the demo of PDF.js all works fine but i think there is an issue in scanned PDF.
please suggest me any solution for this issue.

@timvandermeij
Copy link
Contributor

Strangely, this PDF is very fast for me. It renders in ~1 second and when zooming in, the redrawing process also takes ~1 second... Might have something to do with hardware accelleration being on for me.

@samdemo
Copy link
Author

samdemo commented Jul 9, 2013

Please can you tell me on which browser you have checked this PDF.

@yurydelendik
Copy link
Contributor

Scanned documents will be slower than normal PDFs. In this case it's JBIG2 encoded image. It will be faster on the desktop computers. We will be looking into improving performance (e.g. using asm.js) soon.

@samdemo
Copy link
Author

samdemo commented Jul 9, 2013

ok Thank you so much.

@samdemo
Copy link
Author

samdemo commented Jul 9, 2013

Hi yurydelendik,
can you please suggest me any solution for Issue #3453 ?
I m trying hard to find out why this issue is occurred but can't find any solution, i request you to suggest me any solution ASAP.
Thanks

@timvandermeij
Copy link
Contributor

@samdemo FYI: I'm using Firefox 22 (with hardware acceleration on), Windows 7 x64 and the latest pdf.js development build.

@samdemo
Copy link
Author

samdemo commented Jul 10, 2013

Hi timvandermeij,
May i know which version of PDF.js you have used?
I am using:
PDFJS.version = '0.8.291';
PDFJS.build = '4e83123';

@samdemo
Copy link
Author

samdemo commented Jul 10, 2013

Hi, yurydelendik
Is there any other solution for the performance issue (for scanned PDF), its critical issue for me because its take 1 or 1.5 minutes to load PDF first time and 3-4 seconds for Zoom In/Out operation.
Thanks

@timvandermeij
Copy link
Contributor

@samdemo I'm currently using PDF.js version 0.8.315.

@samdemo
Copy link
Author

samdemo commented Jul 10, 2013

I have also tested using this version and in same hardware configuration, but its strange it behaves same as before.

@samdemo
Copy link
Author

samdemo commented Jul 11, 2013

@yurydelendik
For Issue #3453: PDF doesn't loads in iphone or ipad
i have tried in ipad. it takes more than 15-20 mins, i was thinking there is issue in content loading but its issue of rendering.
please can you suggest me why its taking to much time to load the content?

@timvandermeij
Copy link
Contributor

Loads even faster now on Windows 7 x64, Firefox 22 (HWA on) and PDF.js development, but when zooming in quickly, I get:

Warning: Unhandled rejection: TypeError: font is undefined

in the console.

@timvandermeij
Copy link
Contributor

Closing as fixed. Renders within a second now due to many new patches and the warning no longer appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants