Re: [Evolution-hackers] vfolder performance problems
- From: Lee Revell <rlrevell joe-job com>
- To: Evolution Hackers <evolution-hackers lists ximian com>
- Subject: Re: [Evolution-hackers] vfolder performance problems
- Date: Sun, 17 Apr 2005 01:31:31 -0400
On Sat, 2005-04-16 at 02:58 -0400, Lee Revell wrote:
> I have found the bug that has been causing severe performance problems
> with vfolders, "Unread Mail" in particular.
>
This patch fixes the problem by only searching the message list if the
user has typed something in the search bar. I'm not sure it's the right
fix, but it drastically improves performance for me.
Index: evolution/mail/em-folder-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-browser.c,v
retrieving revision 1.59
diff -u -r1.59 em-folder-browser.c
--- evolution/mail/em-folder-browser.c 28 Feb 2005 04:31:50 -0000 1.59
+++ evolution/mail/em-folder-browser.c 17 Apr 2005 05:26:31 -0000
@@ -435,13 +435,19 @@
emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
{
EMFolderView *emfv = (EMFolderView *) emfb;
- char *search_word, *search_state;
+ char *search_word, *search_state, *text;
if (emfv->list == NULL || emfv->folder == NULL)
return;
g_object_get (esb, "query", &search_word, NULL);
- message_list_set_search(emfb->view.list, search_word);
+ g_object_get (esb, "text", &text, NULL);
+ printf ("emfb_search_search_activated: search is %s\n", search_word);
+ printf ("emfb_search_search_activated: text is %s\n", text);
+ if (text == NULL || text[0] == '\0')
+ message_list_set_search(emfb->view.list, NULL);
+ else
+ message_list_set_search(emfb->view.list, search_word);
g_free (search_word);
g_object_get (esb, "state", &search_state, NULL);
@@ -937,7 +943,7 @@
before the folder is open and need to override the
defaults */
if (folder) {
- char *sstate;
+ char *sstate, *text;
int state;
GConfClient *gconf = mail_config_get_gconf_client();
@@ -974,7 +980,13 @@
/* set the query manually, so we dont pop up advanced or saved search stuff */
g_object_get(emfb->search, "query", &sstate, NULL);
- message_list_set_search(emfb->view.list, sstate);
+ g_object_get (emfb->search, "text", &text, NULL);
+ printf ("emfb_set_folder: search is %s\n", sstate);
+ printf ("emfb_set_folder: text is %s\n", text);
+ if (text == NULL || text[0] == '\0')
+ message_list_set_search(emfb->view.list, NULL);
+ else
+ message_list_set_search(emfb->view.list, sstate);
g_free(sstate);
if ((sstate = camel_object_meta_get (folder, "evolution:selected_uid"))) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]