[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Howto reduce X11 memory usage with several QCanvas /
From:       Achim Spangler <Achim.Spangler () mnet-online ! de>
Date:       2004-06-28 12:04:01
Message-ID: 200406281404.02617.Achim.Spangler () mnet-online ! de
[Download RAW message or body]

Am Sonntag 27 Juni 2004 15:23 schrieb Lubos Lunak:
> Dne čt 24. června 2004 21:48 Achim Spangler napsal(a):
> > So I have the following questions:
> > 1) What can cause this high memory usage of X11 ( the umbrello footprint
> > would be acceptable )?
>
>  QPixmap's are stored in the XServer. Every pixmap takes roughly
> width*height*depth/8 bytes of memory in the XServer.
Is there a possibility to tell X11 / Qt that all items on a Canvas should be 
only displayed with a lower color depth than the X11 desktop has in general - 
i.e. my screen/ X11 desktop has 24Bit. Thus even simple diagrams which 
contain mostly QCanvasRectangle ( plain color - no shapes or other effects ) 
instances can cause a lot of memory usage.

I think that there is no way to tell the X11 server / Qt to use some method of 
compression for hided QCanvas instances - or is there a possibility to do 
this or comparable?

> > 2) What can be done to reduce the memory usage?
> >     -> is there a possibility to tell X11/Qt to eliminate all
> >          metadata, which is needed for clipping/display control ...
> >         so that this metadata could be re-derived on show-event?
>
>  If xrestop reports the memory is used by pixmaps, then it should be only
> the actual pixmaps (i.e. the pixels). So the solution should be only using
> less pixmaps or making them smaller. 
Can I reduce the X11 memory usage by reducing the size of the items in the 
canvas - and then using a corresponding zoom setting, to get the same size on 
display?
Maybe this could be a way to solve the problem.

> I don't know QCanvas though, so I'm 
> afraid I can't help you more.
>
>  I'd suggest you first check what exactly is causing the memory usage. You
> can e.g. put sleep() calls in suitable places when creating the diagrams
> and check that the memory is used really because of QCanvas. My very first
> thought actually was that you were leaking QPixmap's somewhere.
I don't think that the memory usage is caused by leaks - i.e. instances which 
gets lost.
Reason: If I close a project file - but let umbrello run - the memory usage by 
X11 is reduced to a normal value ( around 6MB with several other active 
apps ).
==> the close diagram / close project functions seem to access all Pixmap 
instances for cleanup

Thanks,
Achim
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic