Re: [Evolution-hackers] Performance with Exchange 2003



On Fri, 2005-04-29 at 10:21 +0530, Not Zed wrote:
> 
> > The other, MUCH worse, is that searches for "" are not properly
> > optimized away.  With my config (slow machine, plenty of RAM but CPU
> > starved, and 110,000 messages), this results in probably a 100-1000x
> > performance hit, truly massive.  I am really surprised that your
> > machines are all so fast that this one isn't apparent.  What's the
> > slowest thing you use to test for performance regressions?
> 
> Umm, ok, so this goes back to the original suggestion - this is a
> thread contention issue.
> 
> So it has nothing to do with searching at all.
> 
> Please just get a backtrace, all this worrying about searching speed
> is just wasting our time.
> 

_I_ am wasting _your_ time?!?  That's a good one.  You didn't even try
my patch.

I didn't accuse you of wasting my time with all the hours I sat there
staring at "Generating message list..." waiting for ANYTHING to appear
in the message list pane.

Here's your fucking backtrace.  Now do you believe me that it's a folder
search bug?

I have also attached my patch again.  I'm not interested in any more
feedback from you until you have actually tried my patch.

BTW I know what lock contention is, thank you very much.  Try grepping
the kernel source tree for my email address sometime.

(gdb) info threads
  6 Thread -1256195152 (LWP 21696)  0x410e2a0f in poll () from /lib/tls/libc.so.6
  4 Thread -1246733392 (LWP 21693)  0xb72964b3 in g_hash_table_size () from /usr/lib/libglib-2.0.so.0
  3 Thread -1238201424 (LWP 21692)  0x41172ec6 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
  2 Thread -1229812816 (LWP 21691)  0x41170ec5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
* 1 Thread -1225682816 (LWP 21657)  0x410e2a0f in poll () from /lib/tls/libc.so.6
(gdb) thread 4
[Switching to thread 4 (Thread -1246733392 (LWP 21693))]#0  0xb72964b3 in g_hash_table_size () from /usr/lib/libglib-2.0.so.0
(gdb) bt full
#0  0xb72964b3 in g_hash_table_size () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#1  0xb6c3affa in camel_folder_search_search (search=0xa01d7e0, 
    expr=0xb5b0594c "(and (match-all (not (system-flag \"junk\")))\n  (or\n  \n\t(match-all (header-contains \"Subject\"  \"\"))\n     \n  (match-all (header-contains \"From\"  \"\"))\n  )\n)", uids=0x9c2c710, ex=0x0) at camel-folder-search.c:471
        uids_hash = (GHashTable *) 0xb707aa11
        r = (ESExpResult *) 0x786f626d
        matches = (GPtrArray *) 0x0
        summary_set = (GPtrArray *) 0x9d2d234
        i = 0
        results = (GHashTable *) 0xb6c3a816
        pool = (EMemPool *) 0xb5b05878
        p = (struct _CamelFolderSearchPrivate *) 0xa489218
#2  0xb6b2f8a0 in local_search_by_expression (folder=0xa027d88, expression=0x112 <Address 0x112 out of bounds>, ex=0x112) at camel-local-folder.c:565
        local_folder = (CamelLocalFolder *) 0xa027d88
        matches = (GPtrArray *) 0xa027d88
#3  0xb6c4535c in camel_folder_search_by_expression (folder=0xa027d88, expression=0x119b <Address 0x119b out of bounds>, ex=0x119b) at camel-folder.c:1231
No locals.
#4  0xb6c5fda3 in vee_search_by_expression (folder=0x8342d00, 
    expression=0xb5b0594c "(and (match-all (not (system-flag \"junk\")))\n  (or\n  \n\t(match-all (header-contains \"Subject\"  \"\"))\n     \n  (match-all (header-contains \"From\"  \"\"))\n  )\n)", ex=0xb5214f28) at camel-vee-folder.c:557
        f = (CamelFolder *) 0xa027d88
        i = 2133
        hash = "BCL1Ts0C"
        node = (GList *) 0x9c5a718
        matches = (GPtrArray *) 0x9d2d234
        result = (GPtrArray *) 0x9d2d2a0
        expr = 0xb520e1e0 "(and  (and\n  \n     (match-all (not (system-flag  \"Seen\")))\n    \n  )\n (and (match-all (not (system-flag \"junk\")))\n  (or\n  \n\t(match-all (header-contains \"Subject\"  \"\"))\n     \n  (match-all (header-contai"...
        p = (struct _CamelVeeFolderPrivate *) 0xb3c67614
        searched = (GHashTable *) 0xb524dc38
        folder_unmatched = (CamelVeeFolder *) 0xb3ca4ea0
#5  0xb6c4535c in camel_folder_search_by_expression (folder=0x8342d00, expression=0x119b <Address 0x119b out of bounds>, ex=0x119b) at camel-folder.c:1231
No locals.
#6  0xb6d46fb2 in regen_list_regen (mm=0xb5214f10) at message-list.c:3440
        expr = 0xb5b0594c "(and (match-all (not (system-flag \"junk\")))\n  (or\n  \n\t(match-all (header-contains \"Subject\"  \"\"))\n     \n  (match-all (header-contains \"From\"  \"\"))\n  )\n)"
        uids = (GPtrArray *) 0x4117070b
        uidnew = (GPtrArray *) 0xb5b05a28
        showuids = (GPtrArray *) 0xb5213c70
        searchuids = (GPtrArray *) 0x0
        info = (CamelMessageInfo *) 0x112
        i = -1246734004
        start = {tv_sec = 1114792272, tv_usec = 198680}
        end = {tv_sec = -1246733752, tv_usec = -1227667851}
        diff = 3016389768
#7  0xb6d33c6e in mail_msg_received (e=0x818cad0, msg=0xb5214f10, data=0x0) at mail-mt.c:556
No locals.
#8  0xb7cfada7 in thread_received_msg (e=0x818cad0, m=0x112) at e-msgport.c:826
        func = 0xb6d33b60 <mail_msg_received>
        func_data = (void *) 0x0
#9  0xb7cfaed7 in thread_dispatch (din=0x818cad0) at e-msgport.c:907
        m = (EMsg *) 0xb5214f10
        info = (struct _thread_info *) 0x112
        self = 3048233904
#10 0x4116e9c8 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#11 0x410eaffa in clone () from /lib/tls/libc.so.6
No symbol table info available.



Index: 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
--- mail/em-folder-browser.c	28 Feb 2005 04:31:50 -0000	1.59
+++ mail/em-folder-browser.c	28 Apr 2005 16:28:00 -0000
@@ -435,13 +435,14 @@
 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);
+	message_list_set_search(emfb->view.list, text[0] == 0 ? NULL : search_word);
 	g_free (search_word);
 	
 	g_object_get (esb, "state", &search_state, NULL);
@@ -937,7 +938,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 +975,8 @@
 		
 		/* 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);
+		message_list_set_search(emfb->view.list, text[0] == 0 ? NULL : 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]