PDF plugin uses huge amounts of memory

Bug #505644 reported by zp
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gloobus-preview
Fix Committed
High
Alexandr Grigorcea

Bug Description

I'm on rev 92.

Here is the file:
http://dl.dropbox.com/u/1149078/Equipment%20%26%20Machine%20power%20supply.pdf

Results in a huge spike to RAM used.

Probably because you are keeping all the pages that have been viewed in RAM for faster viewing later.

We should only have a few pages in RAM. I suggest 10 pages up and below the current page you are looking at.
Similar to Evince. They display "Loading..." on pages that aren't fully rendered.

Related branches

Revision history for this message
BadChoice (guitarboy000) wrote :

And what about when we're on page 40, keep the previous 30 pages loaded, or unload them?

I load All pages now for fast viewing (and loading) but yes, it taks so much ram :D so we need to decide.
We can load pages dinamically.

3 options:

   1. All pages in memory (never load nor unload)
   2. load 20 Pages and the nexts dinamically when needed (load when needed, never unload)
   3. Just have 20 pages loaded (unload and load when needed)

Changed in gloobus-preview:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → BadChoice (guitarboy000)
milestone: none → 0.4.2
status: Confirmed → In Progress
Revision history for this message
zp (zekopeko-deactivatedaccount) wrote : Re: [Bug 505644] Re: PDF plugin uses huge amounts of memory

On Mon, Jan 11, 2010 at 1:07 PM, BadChoice <email address hidden> wrote:
> And what about when we're on page 40, keep the previous 30 pages loaded,
> or unload them?
>
> I load All pages now for fast viewing (and loading) but yes, it taks so much ram :D so we need to decide.
> We can load pages dinamically.
>
> 3 options:
>
>   1. All pages in memory (never load nor unload)
>   2. load 20 Pages and the nexts dinamically when needed (load when needed, never unload)
>   3. Just have 20 pages loaded (unload and load when needed)
> --
> PDF plugin uses huge amounts of memory
> https://bugs.launchpad.net/bugs/505644
> You received this bug notification because you are a direct subscriber
> of the bug.
>

How about:

Page we are viewing and 5-10 pages up and down?
That should be reasonable. And don't keep stuff in memory expect those
pages we rendered. The point is to make ram usage small.
Evince loads pages pretty fast for me. So no point in keeping all the
pages in memory.

BadChoice (guitarboy000)
Changed in gloobus-preview:
milestone: 0.5 → 0.5.1
Revision history for this message
Alexandr Grigorcea (cahr-gr) wrote :

there is also a memory leak
just created a folder with two pdfs 108K (15 pages) + 165K (25pages) and started switching from one to another after a couple of switches memory usage is >35%
a fresh open for every file uses ~4% each

opening big pdfs and switching, after a couple of files the whole system goes in thrashing

rev.173, the same with rev. 154

BadChoice (guitarboy000)
Changed in gloobus-preview:
assignee: BadChoice (guitarboy000) → Jordi Puigdellívol (jordi-gloobus)
importance: Medium → High
milestone: 0.5.1 → 0.5
Changed in gloobus-preview:
status: In Progress → Fix Committed
assignee: Jordi Puigdellívol (jordi-gloobus) → Alexandr Grigorcea (cahr-gr)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.