mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.34k stars 9.97k forks source link

Slow rendering for scanned image PDF in IE10/IE11 #7001

Closed dkim18 closed 5 years ago

dkim18 commented 8 years ago

Hi,

I have been testing PDF.js(1.2) in IE10/IE11 as an alternative of Adobe Reader/Acrobat in our web app and so far I have slow rendering issue for scanned image PDF that was generated by Canon scanner(Canon DR-G1100, Canon-7550C, Canon DR-7580).

PDF.js worked fine with FF and Chrome, but IE10/IE11 give me quite slow rendering performance for scanned image PDF file. (Our official web-browser is IE, so it must work with IE.) If I run the helloworld.html with attached sample scanned image PDF file(hard-coded URL), it take about 8 sec per page under Tomcat7, so if takes around 20 sec for three pages of scanned doc. Of course FF and Chrome are quite fast.

This is the sample PDF that anyone can try. scannedDoc4.pdf

thanks, Daniel

all-kozlov commented 7 years ago

When will be fix for this issue? It's very big problem...

Snuffleupagus commented 5 years ago

Please note that IE11 is really old, and haven't received meaningful updates/improvements in a couple of years. Besides, it's general JavaScript performance was never great to begin with, a problem that's further compounded by its lack of support for many modern JavaScript features which thus requires polyfills (which are slower than native code).

One possible explanation, besides general slowness of the browser itself, is that the amount of asynchronous code in PDF.js is difficult for IE11 to handle. However, the PDF.js code has/will only become more async over time (also the case with many other JavaScript applications), so there's nothing that can be done here.

This issue is essentially asking for PDF.js developers/contributors to somehow improve the general JavaScript performance of the IE11 browser itself, which is obviously not possible unfortunately; hence closing this as INVALID seems like the appropriate resolution here.