Closed Bug 842962 Opened 12 years ago Closed 10 years ago

High resource consumption (ram/memory + pixmaps) when scrolling large pdf

Categories

(Firefox :: PDF Viewer, defect, P3)

19 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: linuxhippy, Unassigned)

Details

(Keywords: perf, Whiteboard: [pdfjs-c-performance] [MemShrink:P2])

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130215130331 Steps to reproduce: Loaded the PDF located at http://93.83.133.214/thesis_eissererc_20130220.pdf and scrolled up&down fast Actual results: Beside many rendering issues, I saw a very high resource consumption, as illustrated by the screenshot. Firefox consumed 1.4GB RSS and allocated 36k pixmaps with 477MB in total size. Expected results: more efficient resource management
Component: Untriaged → PDF Viewer
confirm high memory usage. I could see this OOMing on a 32 bit build with some other heavy tab load. On 64bit windows build, increase +100MB while downloading. And then when rendering shot up another +400MB. After idling it dropped 100MB, sitting at +400MB. Next, some scrolling shoots it up another 300MB, putting Ffox working set briefly over 2GB
Keywords: perf
Summary: High resource consumption (ram + pixmaps) when scrolling large pdf → High resource consumption (ram/memory + pixmaps) when scrolling large pdf
Priority: -- → P3
Whiteboard: [pdfjs-c-performance]
Yes, scrolling the linked document up & down leads to > 950mb of X11 pixmaps (video memory!) allocated, please see the new screenshot.
Flags: needinfo?(linuxhippy)
screenshot of xrestop with FF31
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [pdfjs-c-performance] → [pdfjs-c-performance] [MemShrink]
Whiteboard: [pdfjs-c-performance] [MemShrink] → [pdfjs-c-performance] [MemShrink:P2]
I just tried this with a trunk version of pdf.js on my Linux machine. Scrolling fairly quickly through the whole document, speed was pretty good, RSS peaked at 393 MiB, and I didn't see pixmaps go above 60,000 KB. I bet the improvements I wrote about in https://blog.mozilla.org/nnethercote/2014/06/16/an-even-slimmer-pdf-js/ have helped this. They will be in Firefox 33.
> I bet the improvements I wrote about in https://blog.mozilla.org/nnethercote/2014/06/16/an-even-slimmer-pdf-js/ have helped this. They will be in Firefox 33. Clemens, if you're willing to try an Aurora build (at aurora.mozilla.org) you'll be able to see if the improvement has occurred.
The pixmap issue has improved a lot with Aurora, it stays at around 60mb. However scolling like mad still causes firefox to consume 1GB RSS (granted, this is not a normal use case - but to some degree occurs when people search manually for something in large PDFs).
Thanks for the update, Clemens. I'll claim that this bug was about the pixmap issue, and mark it as fixed. There's a pre-existing GitHub issue (https://github.com/mozilla/pdf.js/issues/1887) that covers the "scrolling like mad" case.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: