[evolution-data-server/imap-pop-mobile: 8/12] Some disk I/O optimization.



commit 1632891182886c066866811bdb5bc82ba68f9554
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Thu Jan 12 19:55:29 2012 +0530

    Some disk I/O optimization.

 camel/camel-filter-driver.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index f61aef7..83db370 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -1515,10 +1515,14 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver,
 				CAMEL_MESSAGE_DELETED |
 				CAMEL_MESSAGE_SEEN, ~0);
 
-		if (cache)
+		if (cache && i%10 == 0)
 			camel_uid_cache_save_uid (cache, uids->pdata[i]);
 	}
 
+	/* Save the cache of any pending mails. */
+	if (cache)
+			camel_uid_cache_save_uid (cache, uids->pdata[i]);
+
 	if (p->defaultfolder) {
 		report_status (driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
 		camel_folder_synchronize_sync (



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