Bug 1953

Summary: Excessive memory usage and with large IMAP folder (>50 000 mails)
Product: Claws Mail (GTK 2) Reporter: Bruno <bonbons67>
Component: Folders/IMAPAssignee: users
Status: NEW ---    
Severity: enhancement    
Priority: P3    
Version: 3.7.1   
Hardware: PC   
OS: Linux   

Description Bruno 2009-07-10 22:46:03 UTC
When interacting with a large IMAP folder with lots of (small) messages claws-mail uses excessive amounts of memory.

In my case I've an IMAP folder containing 4 months worth of LKML traffic (62581 mails, 480MB according to claws-mail).

When starting claws-mail top reports 16MB RRS for claws-mail, switching to the LKML folder (whose disk cache had been cleared before previous claws-mail exiting) memory usage goes up to 135MB RSS (117MB when disk cash was not cleared).
Switching to a different folder does not release any memory (at best 1-2MB are released).

I would expect it to use way less memory for those 62000k mails, especially with the help of a disk cache which shall contain all relevant information and be memmapped. (less than 5MB of heap should do for that amount of mails instead of about 100MB, all data being in memmapped disk cache and heap just containing pointers)
Comment 1 Colin Leroy 2009-07-10 23:01:43 UTC
The memory is allocated to an internal cache that isn't freed as soon as you leave a folder, but later. 

We feel that it works well enough, and that it doesn't warrant rewriting the whole stack from cache to GUI using memmapped pointers; if you're really interested in doing this, you should give it a try :)