GNOME Bugzilla – Bug 626180
CamelFolder leakage ?
Last modified: 2013-03-20 08:07:14 UTC
Worried about bug#622366 and the runaway leakage, I knocked up this quick patch to track CamelFolders [ nice that it's now a GObject I guess ]. Having started Evo, and prodded about at a few folders, I exited. Imagine my surprise ;-) to discover see that every folder I had visited was still live in memory: is that deliberate ? Do we intent to keep CamelFolders around indefinitely ? [ do we reduce their resource usage somehow if they are not visible so it doesn't matter ? ] 24 objects leaked 0x80a1cf8 CamelMboxFolder 155 'Templates' 'Templates' 0xa76ba08 CamelMboxFolder 3 'demo' 'Mail/demo' 0x80a19b8 CamelMboxFolder 6 'Inbox' 'Inbox' 0x8abf558 CamelMboxFolder 4 'framework' 'Mail/1OpenOffice/oolists/framework' 0x86f7ae8 CamelVTrashFolder 4 'Junk' '.#evolution/Junk' 0x80a1c28 CamelMboxFolder 5 'Sent' 'Sent' 0x86f7918 CamelVTrashFolder 1 'Junk' '.#evolution/Junk' 0x87cce20 CamelIMAPXFolder 5 'INBOX' 'INBOX' 0x8acd6b8 CamelVTrashFolder 3 'Trash' '.#evolution/Trash' 0xa76b938 CamelMboxFolder 3 'a11y' 'Mail/a11y' 0x8acd318 CamelVTrashFolder 3 'Junk' '.#evolution/Junk' 0x87ccef8 CamelIMAPXFolder 9 'INBOX' 'INBOX' 0x8abf488 CamelMboxFolder 4 'opensuse-noise' 'Inbox/opensuse-noise' 0x87ad818 CamelIMAPXFolder 4 'Cabinet' 'Cabinet' 0x80a1b58 CamelMboxFolder 5 'Outbox' 'Outbox' 0xa76b868 CamelMboxFolder 3 '1freedesktop' 'Mail/1freedesktop' 0x8add2a0 CamelVeeFolder 2 'Unmatched' 'UNMATCHED' 0x87ad8f0 CamelIMAPXFolder 4 'Checklist' 'Checklist' 0x8abf6f8 CamelMboxFolder 3 'Mail' 'Mail' 0x86f7a00 CamelVTrashFolder 3 'Trash' '.#evolution/Trash' 0x86f7830 CamelVTrashFolder 1 'Trash' '.#evolution/Trash' 0xa76bad8 CamelMboxFolder 3 'gnome-announce' 'Mail/gnome-announce' 0x80a1a88 CamelMboxFolder 5 'Drafts' 'Drafts' 0x8abf628 CamelMboxFolder 4 'gnumeric' 'Mail/archive/gnumeric' HTH.
Created attachment 167243 [details] [review] debugging patch
I know we cache CamelFolderInfos in such places as mail/em-folder-tree.c and mail/mail-folder-cache.c, so I doubt the CamelFolders themselves are meant to be kept around indefinitely. The aforementioned source files is where I would begin hunting. See also my comments in bug #622366.
The Trash and Junk folders keep track of opened folders in respective stores, unless a real Trash/Junk folders are selected (on IMAP side currently). Thus this is not a bug. The 155 ref-count on Templates is suspicious, but I've a feeling it was addressed during the last 2 years. In any case, you've opened bug #627257 for the Templates, thus let's investigate there.