evolution-data-server r9393 - trunk/camel/providers/imap



Author: sragavan
Date: Tue Aug 19 05:30:28 2008
New Revision: 9393
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9393&view=rev

Log:
2008-08-19  Srinivasa Ragavan  <sragavan novell com>

	* camel/providers/imap/camel-imap-folder.c: Delete from DB for expunge
	in a optimized way.


Modified:
   trunk/camel/providers/imap/ChangeLog
   trunk/camel/providers/imap/camel-imap-folder.c

Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c	(original)
+++ trunk/camel/providers/imap/camel-imap-folder.c	Tue Aug 19 05:30:28 2008
@@ -1447,6 +1447,7 @@
 imap_expunge_uids_offline (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
 {
 	CamelFolderChangeInfo *changes;
+	GSList *list = NULL;
 	int i;
 	
 	qsort (uids->pdata, uids->len, sizeof (void *), uid_compar);
@@ -1454,12 +1455,15 @@
 	changes = camel_folder_change_info_new ();
 	
 	for (i = 0; i < uids->len; i++) {
-		camel_folder_summary_remove_uid (folder->summary, uids->pdata[i]);
+		camel_folder_summary_remove_uid_fast (folder->summary, uids->pdata[i]);
 		camel_folder_change_info_remove_uid (changes, uids->pdata[i]);
+		list = g_slist_prepend (list, (gpointer) uids->pdata[i]);
 		/* We intentionally don't remove it from the cache because
 		 * the cached data may be useful in replaying a COPY later.
 		 */
 	}
+	camel_db_delete_uids (folder->cdb, folder->full_name, list, ex);
+	g_slist_free(list);
 	camel_folder_summary_save_to_db (folder->summary, ex);
 
 	camel_imap_journal_log (CAMEL_IMAP_FOLDER (folder)->journal,



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