-
Notifications
You must be signed in to change notification settings - Fork 190
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
PDF slow load #2784
Comments
I found that it works fine up to version 21.0.0-alpha.6, but after that, PDFs load slowly. |
I found the issue One at line 35,004 If I add a return in the top of the second setDocument method, the PDF loads much faster and works perfectly. |
…attribute is set before using it (fixed a bug that caused some documents to crash in single-page mode)
…attribute is set before using it (fixed a bug that caused some documents to crash in single-page mode)
Hm. As far as I can tell, you've disabled the Can you confirm that? I've add the BTW: I guess it's obvious that deactivating the scripting manager isn't the solution. It may be a good performance optimization for those who don't need JavaScript in PDF files, so adding an option to disable scripting makes a lot of sense to me. However, you describe it as a regression, so I'd like to find the root cause. |
However, after adding the return statement, the PDFThumbnailViewer stopped working. I think this is because the setDocument function is being used for the thumbnails as well. |
I tested this with different PDFs and noticed a significant performance difference of about 10 seconds. For example, I have another PDF that's 350MB in size - it usually takes 20.59 seconds to load, but with the return statement added, it only takes 10 seconds. I think the slow performance is happening because setDocument is being called simultaneously for both the thumbnail and the main PDF. |
I need your help!
When I try to load a PDF with version 20.5.0-alpha.1, it loads in under 1.02 seconds, but with the latest version after 20, it takes up to 3 seconds. Even the basic PDF.js viewer can load this PDF in under 1 second.
Demo PDF file
Here you can check the PDF
demo.pdf
The text was updated successfully, but these errors were encountered: