From kde-pim Tue Mar 22 02:20:19 2005 From: Don Sanders Date: Tue, 22 Mar 2005 02:20:19 +0000 To: kde-pim Subject: Re: [Kde-pim] kmail memory consumption when importing mails Message-Id: <200503221220.19537.sanders () kde ! org> X-MARC-Message: https://marc.info/?l=kde-pim&m=111145843601055 Hi, On Monday 21 March 2005 20:24, Will Stephenson wrote: > KMail consumes a lot of memory when importing messages. I got 10% > of the way through importing a 700Mb mbox into an mbox folder, and > the kmail process had already consumed 50% of my 1Gb ram, 1Gb swap > according to top. Maildir format performance was the same. > Valgrind doesn't show any leaks, and having spoken with Till and > looked at it would seem that the messages are created in the > KMKernel::dcopAddMessage methods and are not unGot or deleted until > kmail quits. > > The following patch[*] unGetMsg()s immediately after adding them to > the folder in dcopAddMessage*. I have checked to see if calling > KMFolder::addMsg() results in any persistent KMMessage *'s that > will not be cleaned up by the unGetMsg() and haven't seen anything > obviously dangerous, but could someone more familiar with KMail > tell me if this fix is a bad idea? Hopefully someone else will comment besides me as I don't have time to test the patch ATM. But what I can say from looking at the diff is that your approach looks right to me, and that if you don't experience crashes after executing the code you've modified and performing standard operations (like getting mail, composing/sending a mail, and doing a search) then I think given the diff the change is probably ok. Don. _______________________________________________ kde-pim mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/