Sylpheed-Claws isn’t especially heavy on RAM, but something that can feel strange is that when switching from a big folder to an empty one, the RAM usage doesn’t go down. This is because the GtkCTree widget uses GMemChunks to allocate memory, and this thing doesn’t free it when not needed anymore; rather, the glib reuses them. OK. But I thought it’d be nice to force cleaning of stuff from time to time. From the documentation, I can read:
void g_mem_chunk_clean (GMemChunk *mem_chunk);
Frees any blocks in a GMemChunk which are no longer being used.
Let's try!
...
Hmm, it does nothing visible. Let's see...
From glib/gmem.c:
void g_mem_chunk_clean (GMemChunk *mem_chunk) {}
Notice the empty function body.
Hey, you’re supposed not to discover that! Now, where has the magics of memory management gone? D’oh!
Yeah ! you’re supposed to switch to GtkTreeView/GtkTreeModel (even if it’s not perfect, it has a better memory consumption).
an « on-demand » model is available in etpanX if you need it since the GtkTreeStore won’t help you killing the memory down.
I think that calling something like g_mem_chunk_clean() was not really a solution since once a program reached a size, we can consider it’s part of the footprint.
Hoa: Yes. Although GtkTreeView is slower, and it would be a huge rewrite. I’m really not eager to do that :-)
Thanks for your comment. Unfortunately I get this from my distro’s (FC5) versionof Sylpheed-Claws:
Sylpheed-Claws has been compiled with an older GTK+ library than is currently available. This will cause crashes. You need to recompile Sylpheed-Claws.