[KimDaBa] Reducing memory consumption

Jesper K. Pedersen blackie at blackie.dk
Sun Jan 16 19:20:51 GMT 2005


On Sunday 16 January 2005 20:17, Robert L Krawitz wrote:
|    From: "Jesper K. Pedersen" <blackie at blackie.dk>
|    Date: Sun, 16 Jan 2005 20:09:30 +0100
|
|    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.
|
| So that's still going to force a copy?  That's unfortunate, since it's
| a huge chunk of VM.  There's no way to lock the image?
I'm afraid not.
The problem is that the GUI thread and the image loading thread might at the 
same time reduce the reference counter, resulting in it being decrecaded one 
too little.

|    Please CVS up, and let me know if the change result in any crashes
|    in the image loading code.
|
| I did; there was no change (does it take time to propagate to the
| public CVS?)
I don't know, but when writting the mail I hadn't checked in the change, 
please try again, it should be in now.

|    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.

-- 
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