6 ms·
Please do a google search to building plan filetype:pdf (edit: I actually don't know the search terms that would return the real architectural plans and
by acqq 13y ago
Please do a google search to
building plan filetype:pdf
(edit: I actually don't know the search terms that would return the real architectural plans and not some texts, I guess somehow Google ranks PDFs with a lot of texts much higher than the documents with drawings -- but I want to point to these actually! If it's true that Google prefers "a lot of text" documents then attempting to googe to get the examples is a good method to miss most of the documents with the real problems!)
Then try to actually look at every page of such documents with pdf.js. The first I get is
http://www.nist.gov/el/nzertf/upload/NZERTF-Architectural-Plans1-June2011.pdf http://www.nist.gov/el/nzertf/upload/NZERTF-Architectural-Pl...
Try it. You will want to throw your fast computer thorough the window. Then when you manage to calm down you'll try to configure your browser to never invoke pdf.js again, if you know that you need to work with such documents.
If you want a realistic benchmark, compare the speed of rendering these documents with Adobe's or some other native renderer.
I'm not a building architect but I at least don't live in "we don't draw anything significant in our documents" bubble. I know they worry for their potential customers. Forced pdf.js is a huge setback for them. If they would be able to tell the browser in the html "please don't use pdf.js for this one" they would be much happier.
- bthorben 13y agoI just tried the mentioned document in the viewer on http://mozilla.github.io/pdf.js/web/viewer.html http://mozilla.github.io/pdf.js/web/viewer.html I agree that the speed is a lot worse than in Preview.app for example, but it's also not unusable. I will look at it in more detail tomorrow
- acqq 13y agoTry to move through the pages, don't stay on the first one! I have the 22nm i7 CPU here and compared to the work with Adobe PDF reader it's just horrible having to use pdf.js. I must however admit that I'm not able to easily construct a Google search for more such documents, but I know a lot of people who work only with such -- they just can't work with pdf.js. Does your benchmark measure the time to actually display everything on every page (what the human looking at all the pages must do), or just the time until the browser is responsible? Edit: inspired from other comments, it seems that at least search for "math plots filetype:pdf" returns more guaranteed problems like http://www.engageny.org/sites/default/files/resource/attachments/math-g5-m4-lessons-1-12.pdf http://www.engageny.org/sites/default/files/resource/attachm... Still it's hard to find slow PDFs with certainty just by using Google.
- bthorben 13y ago> Does your benchmark measure the time to actually display everything on every page (what the human looking at all the pages must do), or just the time until the browser is responsible? It "only" benchmarks the rendering, all the overhead the viewer produces is not shown. That is intentional, as we will create our own viewer anyway BTW: PDF.js in FF is typically slower than in Opera / Chrome, all these benchmarks used Opera
- bgirard 13y agoI just profiled your example: http://people.mozilla.org/~bgirard/cleopatra/#report=4b995cc512452cbcba17032f0a5d400904a5d09d http://people.mozilla.org/~bgirard/cleopatra/#report=4b995cc... Looks like it could be running much faster: * 20% of the time is spent copying the canvas because someone is, likely erroneously, holding a reference to the canvas. Looking into it: https://bugzilla.mozilla.org/show_bug.cgi?id=1007897 https://bugzilla.mozilla.org/show_bug.cgi?id=1007897 * 10% of the time is spent waiting on display transactions swaps because canvas isn't triple buffered. * PDF.js is not getting empty transaction (canvas draw optimizations). That's just from a quick profile. I'm sure there's a ton more things that could be improved.
- acqq 13y agoThanks! Good work! It's of much more benefit to analyze slow pdfs than to construct the "proofs" that short and simple pdfs are displayed "fast enough" (but I understand that the later feels so good). Especially since it seems that not only pdf.js will benefit from analyzing the slow ones -- if I understand you traced the problems to the cpp code of the browser? That would mean that even non-pdf-js stuff will be faster once it's fixed, is that correct?
- bgirard 13y agoYes the fix to bug 1007897 will help all web content. That profile will show calls from JS and how theycall into native C++ calls. This is very useful for profiling things like canvas. PDF.js isn't bottlenecked by javascript performance, like many well tuned apps out there, so there's a lot of improvements that can be made by tweaking the web platform.
- acqq 13y agoWonderful! You diagnose so fast it looks like magic! Do you see anything new when profiling this one: http://www.engageny.org/sites/default/files/resource/attachments/math-g5-m4-lessons-1-12.pdf http://www.engageny.org/sites/default/files/resource/attachm... and http://www.math.mtu.edu/~msgocken/pdebook2/mapletut2.pdf http://www.math.mtu.edu/~msgocken/pdebook2/mapletut2.pdf
- TwoBit 13y agoI tried loading that and it worked pretty well for me. Not fully native speed, but just a couple seconds to draw complex pages. Certainly not a "throw the computer out the window" experience.
- acqq 13y agoIt's really minutes to see all the drawings, i7, Win 8.1, FF 29 (to compare the CPU speeds, jslinux boots in 7.9 secs on my computer). Adobe Reader is immediate to see all the 20 pages. Have you tried to see all the pages, all the drawings? How many minutes you needed, on which setup? Are you using Firefox? Does it use pdf.js? Is it something OS dependent, or you just didn't look at all the pages? Now I see, Gracana mentions manuals on AutomationDirect.com. Look at this one for example: http://www.automationdirect.com/static/specs/dl0506select.pdf http://www.automationdirect.com/static/specs/dl0506select.pd...
- Dylan16807 13y agoI'm on firefox nightly, using pdf.js, windows. The first pdf takes about 4-5 seconds to render a page, and it always does the page I have onscreen so it doesn't matter how many pages there are.
- acqq 13y agoWhen measure only the first page you will completely miss a lot of problematic PDFs.
- Dylan16807 13y agoI looked at all the pages, picking them at random. It always did the one I had onscreen in seconds.
- vanderZwan 13y agoSo about two or three orders of magnitude slower than native.