[evolution-data-server] Bug #643748 - Slow message_location search rule with maildir accounts
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #643748 - Slow message_location search rule with maildir accounts
- Date: Fri, 11 Mar 2011 13:22:07 +0000 (UTC)
commit 9713686c5ec8dcb3f702c53caadc6a7760790c61
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 11 14:21:30 2011 +0100
Bug #643748 - Slow message_location search rule with maildir accounts
camel/camel-folder-search.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index 7cfe9eb..0c1a575 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -1828,21 +1828,14 @@ read_uid_callback (gpointer ref, gint ncol, gchar ** cols, gchar **name)
static ESExpResult *
search_message_location (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
{
- CamelStore *parent_store;
ESExpResult *r;
gboolean same = FALSE;
- parent_store = camel_folder_get_parent_store (search->folder);
-
if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
- if (argv[0]->value.string && search->folder && parent_store && camel_folder_get_full_name (search->folder)) {
- /* FIXME Pass a GCancellable */
- CamelFolderInfo *fi = camel_store_get_folder_info_sync (parent_store, camel_folder_get_full_name (search->folder), 0, NULL, NULL);
- if (fi) {
- same = g_str_equal (fi->uri ? fi->uri : "", argv[0]->value.string);
+ if (argv[0]->value.string && search->folder) {
+ const gchar *furi = camel_folder_get_uri (search->folder);
- camel_store_free_folder_info (parent_store, fi);
- }
+ same = g_str_equal (furi ? furi : "", argv[0]->value.string);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]