Index: camel/providers/imap/camel-imap-store.c
===================================================================
--- camel/providers/imap/camel-imap-store.c	(revision 9466)
+++ camel/providers/imap/camel-imap-store.c	(working copy)
@@ -2598,12 +2598,17 @@ fill_fi(CamelStore *store, CamelFolderIn
 	folder = camel_object_bag_peek(store->folders, fi->full_name);
 	if (folder) {
 		CamelImapSummary *ims;
-		ims = (CamelImapSummary *) camel_imap_summary_new (folder, NULL);
+
+		if (folder->summary)
+			ims = (CamelImapSummary *) folder->summary;
+		else
+			ims = (CamelImapSummary *) camel_imap_summary_new (folder, NULL);
 
 		fi->unread = ((CamelFolderSummary *)ims)->unread_count;
 		fi->total = ((CamelFolderSummary *)ims)->saved_count;
 
-		camel_object_unref(ims);
+		if (!folder->summary)
+			camel_object_unref (ims);
 		camel_object_unref(folder);
 	} 
 }
Index: camel/providers/imap/ChangeLog
===================================================================
--- camel/providers/imap/ChangeLog	(revision 9466)
+++ camel/providers/imap/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-09-02  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #548343
+
+	* camel-imap-store.c: (fill_fi): Do not read summary information for
+	the folder from DB when we have it fresh in memory already.
+
 2008-08-21  Srinivasa Ragavan  <sragavan@novell.com>
 
 	* camel/providers/imap/camel-imap-summary.c: Implement in-db uid sort
