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

Slow rendering of PDF document #10719

Closed
PdfRegistry opened this issue Apr 9, 2019 · 9 comments
Closed

Slow rendering of PDF document #10719

PdfRegistry opened this issue Apr 9, 2019 · 9 comments

Comments

@PdfRegistry
Copy link

PdfRegistry commented Apr 9, 2019

Attach (recommended) or Link to PDF file here:
Document 24087563_noclientinfo.pdf attached below.

Configuration:
Web browser and its version: Firefox, Chrome, IE
Operating system and its version: Windows 7, Windows 10
PDF.js version: latest (or whatever's on mozilla.github.io/pdf.js/web/viewer.html)
Is a browser extension: No

Steps to reproduce the problem:
Open the PDF in the Demo viewer

What is the expected behavior? (add screenshot)
Expected the PDF to open and render each page in a second or less.

What went wrong? (add screenshot)
The document is taking over 5 seconds to open and render.
Page 4 takes the longest to render.

@timvandermeij
Copy link
Contributor

Closing until the PDF file is provided (in which case we can reopen this), otherwise the issue is not actionable.

@RickGan
Copy link

RickGan commented Apr 10, 2019

@THausherr
Copy link
Contributor

Page 4 has a JPX image (3507 x 2480, so probably 300dpi) but its size is 4 MB. The page 3 image is much smaller (180KB) despite that it looks similar. This PDF was created by "Redax Enterprise Server 3.1.2 Linux Kernel 2.6 64bit Dec 6 2010 Library 9.0.1".

@menver
Copy link

menver commented May 17, 2019

From our analysis this PDF is made up of many objects which is causing a delay for all pages.
I dont think PDF.js is processing this as images but as objects.
We are doing further analysis in-house to see if we can provide further insight.

@menver
Copy link

menver commented Dec 23, 2019

We have analysed this as far as we can. Same conclusion as THausherr

@amit777
Copy link

amit777 commented Sep 27, 2020

I've just tried opening this in Chrome on my macbook air, 8GB ram (about 5 years old). seems to load fine for me:

const pdfjsVersion = '2.7.90';
const pdfjsBuild = '6728c8fa6';

@menver
Copy link

menver commented Sep 28, 2020

HI amit77 thank you for your comment.
I can only conclude this is a windows specific issue if you cannot see this on a mac.
Many thanks

@d3xMachina
Copy link

3 years later and the issue is still present. The above pdf linked by RickGan and many others I usually open have the same performance issue, they take ages to load. On Edge the pdf loads instantly. I have a 13600k and I'm on Windows 11. I tried using the troubleshooting mode and it's the same.

@timvandermeij
Copy link
Contributor

Closing since the pages now render in about one second, most likely thanks to #17946 which introduced a more performant decoder, which is likely the best we can reach for such large images.

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

8 participants