Last Comment Bug 881974 - pdf.js uses too much memory
: pdf.js uses too much memory
Status: NEW
Product: Firefox
Classification: Client Software
Component: PDF Viewer (show other bugs)
: Trunk
: x86_64 Linux
P3 normal with 17 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Brendan Dahl [:bdahl]
: 740171 871249 (view as bug list)
Depends on: 879320 949650 992125 839548 845083 863159 868949 876906 878397 885287 931468 959925 962351 962933 964238 965130 966865 1054161
Blocks: 834358
  Show dependency treegraph
Reported: 2013-06-11 17:15 PDT by Nicholas Nethercote [:njn]
Modified: 2015-08-08 01:06 PDT (History)
26 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Nicholas Nethercote [:njn] 2013-06-11 17:15:13 PDT
pdf.js uses too much memory, at least in some cases.  This is bad, because PDFs are common, and the introduction of pdf.js made it hard to open PDFs in any other way.

This is a meta-bug for tracking specific problems.  I'll put the MemShrink tag on this bug, not on the individual blocking bugs.
Comment 1 User image Marco Castelluccio [:marco] 2013-06-14 08:49:24 PDT
*** Bug 740171 has been marked as a duplicate of this bug. ***
Comment 2 User image Florian Bender 2013-06-14 14:34:51 PDT
Is it possible to hibernate pdf.js (or parts of it) when not in use (i. e. in a background tab)? That will at least help reduce excessive memory usage in some use cases (e. g. when someone opens multiple PDFs at once). 

Would it be possible to implement such a hibernation mode?
Comment 3 User image Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2013-09-13 15:42:43 PDT
*** Bug 871249 has been marked as a duplicate of this bug. ***
Comment 4 User image Liz Henry (:lizzard) (needinfo? me) 2013-09-25 11:45:45 PDT
Here's a user on the support forums also reporting this issue:
Comment 5 User image ryan.brothers 2013-09-30 14:11:13 PDT
I am also seeing extremely high memory usage of 1GB or more when viewing PDF files of scanned images.  See further details at  Please let me know if I can provide more information to help resolve this issue.
Comment 6 User image Nicholas Nethercote [:njn] 2014-03-07 01:32:31 PST
Things are much better now, and I've recently landed a few more patches to the master pdf.js repo that haven't yet been merged into Firefox. I think this can be safely downgraded to a MemShrink:P2. If anyone has example documents that still cause high memory consumption please let me know.
Comment 7 User image Nicholas Nethercote [:njn] 2014-06-16 06:32:51 PDT
I made some additional improvements, described here:

Note You need to log in before you can comment on or make changes to this bug.