RAM memory used goes very high after advancing pages in a large PDF file!!!
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qpdfview |
Fix Released
|
High
|
Adam Reichold |
Bug Description
Hello,
This is the first "bug report" in which I mention something about performance and RAM memory consumption. I must say that qpdfview runs quickly in my laptop, so no complains in this aspect. This time I tried to compare qpdfview with other viewers like evince, for example. Clearly qpdfview has a much better interface, works better, is more configurable, remember settings, etc.
But thinking in the browser plugin idea I mentioned earlier, not consumming too much RAM memory is important, so I compared both in this aspect:
I opened a file (in case you want to test with the same file, this is it: http://
In the settings file, I used antialiasing (otherwise, fonts looked really ugly in this file). In evince, the document looked more or less the same than in qpdfview. I didn't used "prefetch" and 32MB as cache (I think it is the default) -results with prefetch were actually very similar-
In my computer, this happened in terms of RAM (using my task manager to see the result):
- Just after opening them, evince took 29.1 MB, qpdfview took 35.5 MB.
- After advancing pages (using the mouse wheel) going to the end of the file, evince took 44 MB as maximum. And I when fast to the end, use the keys to going to the begining, advance and pages, return again to the beginning, etc.
- After advancing pages (using the mouse wheel) until the end of the file, qpdfview took 346 MB of RAM (it was increasing all the time when advancing)!!!! I waited one minute to see if the program was going to "liberate" some memory and it didn't happen. I used the keys to return to the beginning and it stayed between 220 MB and 345 MB
So, I definitely see a memory problem here. It seems to me that after advancing pages, the program (I don't know if this is a problem of qt, popper, or qpdfview) doesn't liberate memory from pages that already were seen, but keeps accumulating. In consequence, RAM consumption could be very high at the end of a really large document.
I think this is an important "bug" to test and check. As a comment, CPU comsumtion never went very high, and the program run fast (never lagged or something like that) during the whole process.
Thanks for your attention :)
Changed in qpdfview: | |
assignee: | nobody → Adam Reichold (adamreichold) |
importance: | Undecided → High |
status: | New → Incomplete |
Changed in qpdfview: | |
status: | Fix Committed → Fix Released |
I agree that this problem should be taken seriously. Especially for a program that aims to be lightweight. (Just thinking about it, I'd say that only prefetching could - under very special usage patterns - consume memory without bounds.)
I tested the file and could not reproduce the problem. Using the default settings for cache and prefetch, qpdfview was never using more than 80 MB of RAM while displaying the linked file. So first things first, what Qt and Poppler versions do you use? (Personally, I use Qt 4.8.2 and Poppler 0.20.2.)
Another user reported a similar problem directly to me in the past where he found that some files make qpdfview and Okular consume a lot of memory which however do not pose a problem for Evince. Hence it would be nice if you could test this with another program like Okular that uses the Poppler-Qt frontend.
The main difference is that the Poppler-Qt relies on the Splash rendering backend whereas the Poppler-GLib frontend relies on the Cairo rendering backend. A "Qt-native" Arthur backend exists but is unfinished. So if Okular has the same memory problems, it is probably something inside the Splash rendering backend which is possibly already fixed in the current Poppler version. If not, we have to try to find the problem in qpdfview in the next two weeks. :-\
Best regards, Adam.