! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Ristretto consumes > 700MB RAM loading 8.6MB JPEG
Status:
RESOLVED: FIXED
Product:
Ristretto
Component:
Application

Comments

Description Robert Delahunt 2010-05-29 22:13:35 CEST
I am filing this as a bug (but please feel free to change it to nuissance / trivial / etc as appropriate) because ristretto consumes in excess of 10x the size of an image when loading an image.

Image source: http://upload.wikimedia.org/wikipedia/commons/f/f0/Iridescent_Glory_of_Nearby_Helix_Nebula.jpg (8.6MB)

Save image then open in ristretto.  Other than taking almost a minute on a Core 2 Duo machine with 2GB RAM, upon finally loading, RAM usage is immense:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 5695 robert    20   0  761m 745m 7872 R   80 37.0   1:18.93 ristretto 

Much less if ristretto feels the need to do a refresh of the image during initial load you see RAM usage spike to twice this.

Strace made available for troubleshooting purposes.

If ristretto is going to market itself as a minimal image viewer, it ought to be minimal.  On a brand new netbook with 512MB RAM this would probably cause intense swap thrashing.

For what it's worth, when loading same image in GIMP:
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
3829 robert    20   0  721m 653m  10m S    0 32.4   1:16.35 gimp-2.6

Other than both programs using too much RAM, Ristretto should not be using more than (much less anywhere near) the amount of RAM a full-featured image editor does.
Comment 1 Robert Delahunt 2010-05-29 22:18:13 CEST
Er, not 10x, my math is off (it's morning).

Strace was too large to attach, so see http://www.puresimplicity.net/~delahunt/ristretto.strace if you dare (11MB).
Comment 2 Robert Delahunt 2010-05-29 22:34:18 CEST
FWIW

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND        
 7489 robert    20   0 95840  35m  20m S    0  1.8   0:03.55 gwenview      

Also

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND   
 7606 robert    20   0  750m 304m 7728 R   93 15.1   0:09.18 gqview      

(Will file GQView bug)
Comment 3 Stephan Arts editbugs 2010-07-25 10:44:48 CEST
Yeah, this is because ristretto loads it at 100% quality - which is silly.

16000 * 16000 * 24 = 6 GB.

I am working on a way that it only renders images at the quality required to show the contents of the image on-screen. And re-render pieces that need to be viewed at a higher quality.

Unfortunately, all attempts I made so far have failed. I intend to fix it before 0.1.0 though.
Comment 4 Stephan Arts editbugs 2010-08-06 10:29:40 CEST
(In reply to comment #3)
> Yeah, this is because ristretto loads it at 100% quality - which is silly.
> 
> 16000 * 16000 * 24 = 6 GB.
> 
> I am working on a way that it only renders images at the quality required to
> show the contents of the image on-screen. And re-render pieces that need to be
> viewed at a higher quality.
> 
> Unfortunately, all attempts I made so far have failed. I intend to fix it
> before 0.1.0 though.

Wrong calc: (a 0 off) 256MP*24bit = 758MB
Comment 5 Stephan Arts editbugs 2011-09-21 20:14:43 CEST
It no longer does that since it does not allow rendering at full quality.

Bug #6480

Reported by:
Robert Delahunt
Reported on: 2010-05-29
Last modified on: 2011-09-21

People

Assignee:
Stephan Arts
CC List:
0 users

Version

Version:
0.0.22

Attachments

Additional information