News for hackers. Stuff that matters.
Re:Firefox 80 by Pxtl on Tuesday August 25, 2020 @12:58PM (#24273408)
Unfortunately FF's PDF viewer is easily the worst, performance-wise. Whenever I view a brutally overcomplicated PDF (like a map or something) in Firefox it just trainwrecks, and I have to download it and view it in something else.

Maybe they've improved it since last year or so, but I've gotten into the habit of working around pdf.js.

Re:Firefox 80 by mapgrep on Tuesday August 25, 2020 @01:20PM (#24273668)
I was under the impression Firefox used PDF.js -- javascript rendering of PDFs -- as its native PDF viewer. I could be very wrong. But if so, would explain the performance issues.

PDF.js is known to be built into Firefox, I cannot think of why it would be, other than for the purpose of functioning as the core pdf viewer. But I am not that imaginative!

https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Ques...

https://en.wikipedia.org/wiki/PDF.js

Re:Firefox 80 by muxator on Tuesday August 25, 2020 @04:06PM (#24275513)
It started as an experimental extension and was integrated once it was deemed stable. That was a long time ago, anyway (~8 years, probably more).
Re:Firefox 80 by runxel on Tuesday August 25, 2020 @02:07PM (#24274170)
Worst compared with what?

I mainly use Acrobat Pro, but I find myself opening my PDFs in Firefox more and more. Acrobat is really slooooooow, it takes ages for a cold start, and after it started the whole thing gets locked up for a minute or so. Absolutely infuriating. PDF.js/Firefox instead is just a smooth ride for me...

Re:Firefox 80 by mmsimanga on Tuesday August 25, 2020 @01:14PM (#24273587)
On Windows when using Firefox default behaviour launches Edge as PDF viewer. Now I have two resource hungry browsers open. I only have 8G Ram and if I also have Eclipse open then opening a PDF slows my whole computer down. I now download PDFs and use Sumatra to open them. I can continue working.
Re:Firefox 80 by ChuckNorris89 on Tuesday August 25, 2020 @02:03PM (#24274111)
HN is an interesting place. I often got the feeling that everyone here was working on the latest maxed out MB Pro but your comment made me realize I'm not the only one working with limited resources.
Re:Firefox 80 by cassepipe on Tuesday August 25, 2020 @02:25PM (#24274383)
I use a late 2007 plastic MacBook with 4GB of RAM. Works quite well ;) (thanks Linux Mint)
Re:Firefox 80 by boogies on Tuesday August 25, 2020 @02:46PM (#24274610)
I use 4GB of RAM as well, with Puppy Linux loaded entirely into it (hard drives only mount the same way as usb drives), in a refurbished desktop.
Re:Firefox 80 by jandrese on Tuesday August 25, 2020 @01:03PM (#24273446)
Nope, feed it a modestly complex PDF and it will chew through all 16GB of RAM on my system and crash.
Re:Firefox 80 by eptcyka on Tuesday August 25, 2020 @01:06PM (#24273485)
Would you possibly have a link to a sufficiently complex PDF document? I've not encountered one in a while.
Re:Firefox 80 by int_19h on Tuesday August 25, 2020 @06:27PM (#24276985)
"Sufficiently complicated" can mean different things. E.g. a document that's long enough, or one that has a lot of vector primitives in it (basically PDF as a vector graphics format).

For the former, ISO C++ drafts are a good test case. For example, here's C++20 final draft - 1841 pages:

https://isocpp.org/files/papers/N4860.pdf

However, when I tried this in Chrome and Firefox, Firefox not only loaded it just fine, but it is also noticeably faster when scrolling.

For the second, USGS publishes their topographic maps as free PDFs. These have several layers, one of which is the vectorized map, and another is satellite bitmaps.

https://store.usgs.gov/filter-products?sort=relevance&scale=...

The ones with a lot of roads and contour lines (i.e. any city that's on hills) take a while to rasterize. Say, Seattle:

https://store.usgs.gov/product/499688

This one is so slow in Chrome, it's practically unusable - if you zoom in and try to pan around, it can take over a second for it to actually move. This despite the fact that it doesn't even render the satellite layer.

In Firefox, you get the satellite layer (and no way to turn it off, so far as I can tell), and yet it feels more responsive. I think it's because the viewport is always adjusted immediately - actual rendering still takes a while to catch up.

In Adobe Reader the rendering keeps up with scrolling, so long as the satellite layer is not enabled. If it is, it gets jerky when rendering any part for the first time. But it seems to be doing better at caching rendered parts of the document - once it's all rendered, it's smooth panning all around. Chrome and Firefox readers both keep re-rendering parts that go out of view and then back, if you scroll far enough.

Re:Firefox 80 by microcolonel on Tuesday August 25, 2020 @02:36PM (#24274497)
As slow as PDF.js is, Acrobat is somehow slower.
Re:Firefox 80 by dx87 on Tuesday August 25, 2020 @01:05PM (#24273475)
Yeah, PDFs frequently don't work at all in FF for me, I'd be suprised if anyone set it as the default.
Re:Firefox 80 by cptskippy on Tuesday August 25, 2020 @01:27PM (#24273728)
Works fine for me, I already have it setup as the default App for viewing PDFs. I don't even have Acrobat installed. It's not the best viewer out there and it still works fine 99% of the time for me.