[evolution-data-server] Add only used message UIDs to virtual Trash/Junk data_cache



commit 62f2b4d2e093938902d752b956ffc1f0fde6924e
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jul 26 17:19:18 2012 +0200

    Add only used message UIDs to virtual Trash/Junk data_cache
    
    On removal from virtual Trash/Junk folder was also tried to remove
    message UIDs from Unmatched folder, but because these virtual
    Trash/Junk folders don't influence Unmatched folder, then it's
    a no-op, except of a side-effect of adding all UIDs from the respective
    folder into virtual Trash/Junk folder data_cache, which made only
    exhausting memory usage for the application with no gain.

 camel/camel-vee-folder.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index c46cea0..bc4fd99 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -276,6 +276,13 @@ vee_folder_merge_matching (CamelVeeFolder *vfolder,
 		g_object_unref (mi_data);
 	}
 
+	/* Not a real search folder influencing Unmatched folder, thus skip it.
+	   The removal requires CamelVeeMessageInfoData, which is added on demand
+	   to CamelVeeDataCache, thus even the virtual trash/junk folder doesn't
+	   need it, it is left in the data_cache since then on */
+	if (!vfolder->priv->parent_vee_store)
+		return;
+
 	rud.vfolder = vfolder;
 	rud.vsummary = vsummary;
 	rud.subfolder = subfolder;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]