Bug 127570 - New mail takes about 20 sec
Summary: New mail takes about 20 sec
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Evolution (show other bugs)
Version: Final
Hardware: All All
: P5 - None : Normal
Target Milestone: ---
Assignee: Susarla Parthasarathi
QA Contact: Poornima Nayak
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-11 15:08 UTC by Stanislav Brabec
Modified: 2006-03-27 17:37 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Attaching a probable fix. (patch by partha) (2.41 KB, patch)
2006-03-15 14:56 UTC, Veerapuram Varadhan
Details | Diff
screenshot of the menu (188.21 KB, image/jpeg)
2006-03-18 03:54 UTC, Susarla Parthasarathi
Details
Alternate fix - the hang was because of a double-free. (2.27 KB, text/x-patch)
2006-03-21 14:17 UTC, Veerapuram Varadhan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Brabec 2005-10-11 15:08:18 UTC
Pressing New mail, window appears and lets me to write mail address.

Once filled, I want to continue with subject and body. I have to wait about 20
sec before corsor appears.

Wait times:
Athlon 1200, 768MB RAM: 20 sec
AMD64 3000+, 1G RAM: 5 sec

Additional info:
I am using 4 lines signature with hrule, plain text mode is default

I am using following spell checking dictionaries:
Czech
English (British)
English (American)

If I turn off all these dictionaries New mail is up in less than 1 sec.
Comment 1 Veerapuram Varadhan 2006-03-15 14:56:49 UTC
Created attachment 73035 [details]
Attaching a probable fix. (patch by partha)
Comment 2 Stanislav Brabec 2006-03-15 16:04:50 UTC
Less than two seconds between clicking "New mail" and being able to write on AMD64 3000+. Later I will let you know the result for Athlon 1200.
Comment 3 Stanislav Brabec 2006-03-17 11:04:26 UTC
Athlon 1200: 4 seconds. Not extremely fast, but much faster than before.

But the patch is bad. I am easily able to hang evolution:
1. New mail
2. Type some nonsenses into mail body
3. Move mouse over one of typed misspelled words and press right mouse button.

Actual behavior: Hang
Previous behavior: Menu

Here is a backtrace from gdm (12 threads). Surprisingly killall -11 evolution-2.6 did nothing.

#0  0x00002aecf64e6278 in __lll_mutex_lock_wait () from /lib64/libc.so.6
#1  0x00002aecf6647980 in __after_morecore_hook () from /lib64/libc.so.6
#2  0x00002aecf6dcc210 in ?? ()
#3  0x00002aecf648b9c2 in malloc_stats () from /lib64/libc.so.6
#4  0x00002aecf5632132 in _XRead () from /usr/X11R6/lib64/libX11.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf64d31d6 in *__GI___poll (fds=0x1aa2500, nfds=10, timeout=-1) at poll.c:87
#1  0x00002aecf62b6192 in g_main_context_iterate (context=0x1648b40, block=1, dispatch=1,
    self=<value optimized out>) at gmain.c:2867
#2  0x00002aecf62b6655 in g_main_loop_run (loop=0x18e6460) at gmain.c:2769
#3  0x00002aecf37ef890 in link_set_io_thread () from /opt/gnome/lib64/libORBit-2.so.0
#4  0x00002aecf62cf6b6 in g_thread_create_proxy (data=0x1648cf0) at gthread.c:564
#5  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#6  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()

#0  0x00002aecf64d31d6 in *__GI___poll (fds=0x1b04c20, nfds=1, timeout=-1) at poll.c:87
#1  0x00002aecf62b6192 in g_main_context_iterate (context=0x19e9360, block=1, dispatch=1,
    self=<value optimized out>) at gmain.c:2867
#2  0x00002aecf62b6655 in g_main_loop_run (loop=0x1ade720) at gmain.c:2769
#3  0x00002aecf0405d9d in startup_mainloop (arg=<value optimized out>) at e-book.c:3728
#4  0x00002aecf62cf6b6 in g_thread_create_proxy (data=0x19e6e10) at gthread.c:564
#5  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#6  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6c6ea0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6c6ea0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6c6470) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6c6ea0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6c6ea0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6cd4d0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x7390f0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6c6ea0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

#0  0x00002aecf3b2c676 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00002aecf10f9c87 in e_msgport_wait (mp=0x6c6ea0) at e-msgport.c:660
#2  0x00002aecf10fa0ec in thread_dispatch (din=<value optimized out>) at e-msgport.c:1022
#3  0x00002aecf3b293a3 in start_thread (arg=<value optimized out>) at pthread_create.c:261
#4  0x00002aecf64db53d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()
Comment 4 Susarla Parthasarathi 2006-03-18 03:52:28 UTC
Thanks for the stack trace, but the trace unfortunately does not suggest much. I have been using this patch for sometime now (closer to 3 months) never has it caused evolution to hang/crash though.
Is there anyway we could get a better trace? Instructions can be found here http://live.gnome.org/GettingTraces

Comment 5 Susarla Parthasarathi 2006-03-18 03:54:35 UTC
Created attachment 73796 [details]
screenshot of the menu

This is the screenshot of how the patch exactly works. I have 3 disctionaries enabled (American/British/Canadian), currently looking at the suggestions from the American Dictionary
Comment 6 Stanislav Brabec 2006-03-20 11:53:36 UTC
There is no chance to get better stack trace - all debugging symbols (maybe except xorg) are installed.

It is not a crash, but hang. I am not able to enter the menu in screenshot. It consistently hangs after pressing right mouse button. Menu never appears and evolution stops responding. After recompilation without this patch there is no problem to see a manu.

Locale: cs_CZ.UTF-8. Dictionaries:

Czech
English (British)
English (American)

SuSE Linux 10.1 beta8 AMD64
evolution-2.6.0-3
evolution-data-server-1.6.0-3


Additionally I have found following memory consumption:
1. Start evolution
2. New mail
             total       used       free     shared    buffers     cached
Mem:       1028972     965096      63876          0      54480     275844
-/+ buffers/cache:     634772     394200
Swap:      2104472      82300    2022172

3. Click to mail body, quickly type three three-letter nonseses.
             total       used       free     shared    buffers     cached
Mem:       1028972    1016348      12624          0      54908     273648
-/+ buffers/cache:     687792     341180
Swap:      2104472     106220    1998252

This is with this patch. Is it OK. Spell dictionaries initialization?
Comment 7 Veerapuram Varadhan 2006-03-21 14:17:19 UTC
Created attachment 74199 [details]
Alternate fix - the hang was because of a double-free.

@Stanislav: Would you mind trying this patch?
Comment 8 Stanislav Brabec 2006-03-21 15:41:10 UTC
With the new patch menu appears and speed seems to be equal to previous patch.

Is removal of "Check Word Spelling..." menu (and dialog in a separate window) deliberate?
Comment 9 Susarla Parthasarathi 2006-03-23 17:40:23 UTC
yes, the intent is to remove the dialog when the "Check word spelling" is clicked and instead show all the spelling suggestions in the menu itself. This is in a way HIG compliant too. Am not sure if its faster than the original implementation cos i have not done any timing tests on this patch. But IMHO this is much more efficient and friendlier than the previous implementation :)
Comment 10 Stanislav Brabec 2006-03-23 17:55:12 UTC
It seems to be both friendlier and faster. Let's see whether it will fix also bug 100135.

Feel free to submit it to Autobuild.
Comment 11 Susarla Parthasarathi 2006-03-27 04:43:31 UTC
varadhan, could you get this into the autobuild system??
Comment 12 Veerapuram Varadhan 2006-03-27 17:37:32 UTC
Fixed for Beta-9.