Bug 149232 - Memory consumption is much too high
Summary: Memory consumption is much too high
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
: 151128 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-26 16:43 UTC by Ronny Standtke
Modified: 2008-12-08 23:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ronny Standtke 2007-08-26 16:43:40 UTC
Version:           0.5.7 (using KDE 3.5.7, Debian Package 4:3.5.7.dfsg.1-4 (lenny/sid))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.21-2-686

Unfortunately, I had to read the PDF contained in the following ZIP file:
http://www.ecma-international.org/publications/files/ECMA-ST/Office Open XML Part 4 (PDF).zip

I was using KPDF, opened the file and searched for the string "netscape". Suddenly my machine became _very_ unresponsive. I noticed that KPDF was using up insame amounts of RAM (>300 MB).

I tested the same procedure with other programs and looked how much memory they consume. The results are significantly lower:
XPDF         : 26 MB
Evince       : 95 MB
Adobe Acrobat: 190 MB

Maybe this use case is helpful when looking for the source of KPDF's large memory consumption when compared to the competition.
Comment 1 Pino Toscano 2007-08-27 11:09:17 UTC
How much RAM do you have, and how much free RAM was there when you started KPDF? And, which memory policy do you have set in the configuration?
Comment 2 Ronny Standtke 2007-08-29 08:51:51 UTC
Sorry, I have to correct myself in several aspects:
1) The problematic PDF was this file http://www.ecma-international.org/news/TC45_current_work/Ecma TC45 OOXML Standard - Draft 1.3.pdf
2) I was experiencing the problems on my notebook running Kubuntu 7.04 with KPDF 0.5.6. (I wrote the bugreport on my desktop system running KPDF 0.5.7.)
2) KPDF was using almost 700 MB memory.

> How much RAM do you have, and how much free RAM was there when you started
> KPDF?

Here is the situation before I started KPDF:
ronny@denkbrett:~$ free
             total       used       free     shared    buffers     cached
Mem:        515404     344904     170500          0      12108     219964
-/+ buffers/cache:     112832     402572
Swap:       996020          0     996020

This is the situation after I used KPDF:
ronny@denkbrett:~$ free
             total       used       free     shared    buffers     cached
Mem:        515404     507020       8384          0        544      37104
-/+ buffers/cache:     469372      46032
Swap:       996020     371016     625004

top - 08:30:14 up 5 min,  2 users,  load average: 1.43, 0.96, 0.42
Tasks: 114 total,   2 running, 112 sleeping,   0 stopped,   0 zombie
Cpu(s):  8.5%us,  1.6%sy,  0.0%ni, 87.6%id,  2.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    515404k total,   509760k used,     5644k free,     1216k buffers
Swap:   996020k total,   370980k used,   625040k free,    40664k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5391 ronny     15   0  695m 389m 6892 S  0.0 77.4   0:40.08 kpdf
 5031 root      15   0  105m  12m 1544 R  2.2  2.5   0:10.17 Xorg
 5372 ronny     15   0 35372 8516 5944 S  3.7  1.7   0:00.82 konsole
 5240 ronny     15   0 38160 6700 4844 S  1.5  1.3   0:02.28 kicker

> And, which memory policy do you have set in the configuration?
Normal (Standard)
Comment 3 Ronny Standtke 2007-08-29 08:52:43 UTC
3) I can only count to 2 ;-)
Comment 4 Albert Astals Cid 2007-08-30 00:02:05 UTC
@Pino: He speaks of text search, afair we don't do memory management on text memory, maybe we should.
Comment 5 Pino Toscano 2007-10-21 13:05:24 UTC
*** Bug 151128 has been marked as a duplicate of this bug. ***
Comment 6 Ronny Standtke 2008-12-08 23:05:58 UTC
I just tested KDE-4.2 beta 1 and Okular does much better regarding memory. On the other hand, it eats up my CPU... Anyway, closing this bug as fixed...