When I opened a folder with 260k messages, kmail2 used more than 3 G of memory before it is killed by oom, which is a lot comparing to kmail1 which only took about 300 M. The valgrind results seems to indicate most of the memory is used by Akonadi::ItemFetchJob, not sure if this is a similar issue like bug:258551 where the jobs never got deleted. You can find the valgrind --tool=massif output in the attachment.
Created attachment 69442 [details] output of valgrind --tool=massif kmail Sorry I have to gzip the log since it is bigger than 1M
Git commit 815957a4a9ae567f271453aac222abf4c09900f9 by Sergio Martins. Committed on 17/07/2013 at 09:45. Pushed by smartins into branch 'KDE/4.11'. mixedmaildir: don't use 1.5GB of memory when importing a very big folder Subjobs pile up too fast because they are cheap to create and because it's taking around 5 event loops for one to start. Related: bug 260647, bug 317122, bug 309732, bug 307066 M +41 -6 resources/mixedmaildir/retrieveitemsjob.cpp M +4 -2 resources/mixedmaildir/retrieveitemsjob.h http://commits.kde.org/kdepim-runtime/815957a4a9ae567f271453aac222abf4c09900f9
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present? If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.