Open MartinX3 opened 6 years ago
This is indeed a problem. I have updated from Ubuntu 16.04 to 18.04, i.e. atril 1.12.2 -> 1.20.1. Atril now uses about 500MB for its resident set (i.e. actual memory usage) per instance/file. The virtual memory has become huge as well lately, but this is because of a security feature named gigacage that comes from webkit and should not be a problem but using half a gig for a pdf file is (i regularly have a dozen or more of them open). Edit: I am at over 850MB for a single instance now and I bet that's not the end.
can someone attach a sample file?
Sure, https://repository.kallipos.gr/bitstream/11419/4546/1/13052_00_master_document_final.pdf this 18MB file consumes over 200MB of memory on my debian stretch 64 bit with Mate 1.18, atril 1.18 poppler/cairo 0.48. I havent noticed an increase over time. Perhaps an increase per document over number of documents/ programs open.
EDIT: For comparisson: xpdf uses 20MB mupdf: 15MB qpdfview:75MB
https://github.com/linuxmint/xreader/ XReader: 85MB Cinnamon-Desktop standard reader.
Can confirm. I have 82GiB of virtual memory in use by atril.
8291 (atril) S 1 1518 1518 0 -1 4194304 223418 140 136 0 5952 103 0 1 20 0 10 0 2493701 88497524736 68931 18446744073709551615 94344667787264 94344668238096 140732167310880 0 0 0 0 4096 512 0 0 0 17 3 0 0 44 0 0 94344670335264 94344670355536 94344674361344 140732167312889 140732167312940 140732167312940 140732167315433 0
These are the stats. When scrolling fast it consumes 100% CPU time in a single thread and the UI freezes fore some seconds.
Atril 1.20.1 with poppler/cairo 0.62.0 on Ubuntu Mate 18.04 File open: https://speakerd.s3.amazonaws.com/presentations/782158889fa14aa8960634c08574a217/2019-03-25-dotgo.pdf
The virtual memory usage is benign and not a problem, that's just gigacage as mentioned before.
My question is, why it needs so much ram for this little file?
Expected behaviour
Less memory/ram consumption.
Actual behaviour
132,9MiB in memory. Over time up to ~500MiB when the computer runs a few days for a few hours each (and being in standby over night).
Steps to reproduce the behaviour
Open a 761,9kB big pdf file.
MATE general version
1.18.0
Package version
1.18.1
Linux Distribution
Ubuntu Mate 17.10