[evolution-data-server/gnome-3-20] Bug 764172 - [IMAPx] Load folder summary into memory before sync/fetch
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-20] Bug 764172 - [IMAPx] Load folder summary into memory before sync/fetch
- Date: Wed, 30 Mar 2016 21:34:33 +0000 (UTC)
commit 0de128189eb96ad18b6ffcce6d9cf9b5d96416d9
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 30 23:28:54 2016 +0200
Bug 764172 - [IMAPx] Load folder summary into memory before sync/fetch
Make sure the folder summary message infos are loaded in memory before
folder content fetch (refresh) and before the synchronization (store
local changes), to avoid slowness when reading message infos one by one.
camel/providers/imapx/camel-imapx-server.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 569d9ad..b491407 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -4966,6 +4966,8 @@ camel_imapx_server_refresh_info_sync (CamelIMAPXServer *is,
uidl = 1;
}
+ camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
+
known_uids = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) camel_pstring_free,
NULL);
success = imapx_server_fetch_changes (is, mailbox, folder, known_uids, uidl, 0, cancellable, error);
@@ -5174,6 +5176,9 @@ camel_imapx_server_sync_changes_sync (CamelIMAPXServer *is,
g_object_unref (settings);
}
+ if (changed_uids->len > 20)
+ camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
+
off_orset = on_orset = 0;
for (i = 0; i < changed_uids->len; i++) {
guint32 flags, sflags;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]