[KimDaBa] Reducing memory consumption

Jesper K. Pedersen blackie at blackie.dk
Sun Jan 16 19:09:30 GMT 2005


I'm afraid that I can't apply this patch.
I need to detach otherwise there might be a race condition between the two 
threads for the reference counter for the QImage.
I changed the code so it will detach right after putting the image in the 
ImageEvent, this will hopefully resolve the issue, and will ensure that the 
image is not copied an extra time when taken out of the event in the GUI 
code.

Please CVS up, and let me know if the change result in any crashes in the 
image loading code.

I'd rather not spent to much more time on this issue, as it will be resolved 
in Qt4 where the race condition is resolved in Qt internally.

Cheeers
Jesper.

On Saturday 15 January 2005 06:36, Robert L Krawitz wrote:
| I took a very quick look at the memory consumption issue (displaying a
| big image consumes a lot of memory).  This particular change didn't
| cause any obvious breakage, and it got rid of the spike (90 MB -> 250
| MB -> 170 MB).  However, it still seems like 80 MB is a bit high for
| the image in question, which is somewhere in the range of 5500x3500
| pixels (18 million pixels).  Perhaps there's some way of reducing it
| some?
|
| *** imagemanager.h.~1.19.~	2005-01-13 05:20:23.000000000 -0500
| --- imagemanager.h	2005-01-14 23:44:01.510905120 -0500
| ***************
| *** 42,48 ****
|
|   private:
|       ImageRequest* _request;
| !     QDeepCopy<QImage> _image;
|   };
|
|   // This class needs to inherit QObject to be capable of receiving events.
| --- 42,48 ----
|
|   private:
|       ImageRequest* _request;
| !     QImage _image;
|   };
|
|   // This class needs to inherit QObject to be capable of receiving events.
|
| _______________________________________________
| KimDaBa mailing list
| KimDaBa at klaralvdalens-datakonsult.se
| http://sulaco.hrhansen.dk/mailman/listinfo/kimdaba

-- 
Having trouble finding a given image in your collection containing
thousands of images?

http://ktown.kde.org/kimdaba might be the answer.



More information about the Kphotoalbum mailing list