GNOME Bugzilla – Bug 303634
100% CPU Usage on message open
Last modified: 2006-06-12 12:11:01 UTC
Steps to reproduce: 1. Import the attached message 2. Attempt to open said message Evolution freezes and consumes 100% CPU until force-killed. Stack trace: Other information:
Created attachment 46270 [details] Importable message that causes described problem.
+ Trace 59487
Thread 7 (Thread 81926 (LWP 13117))
Thread 6 (Thread 65541 (LWP 13116))
Thread 5 (Thread 49156 (LWP 13114))
Thread 4 (Thread 32771 (LWP 13112))
Thread 3 (Thread 16386 (LWP 13111))
gtkhtml stuff
I don't think it is a bug. It is just the mail is lengthy (450 pages ???) so it takes long time to display. Otherwise it works fine.
Even so, a long email really can't be allowed to consume evolution's exclusive attention for very long. If the user's trying to give up on it and open another message/folder, or even just close evolution, they should be able to, right?
I am marking this as "Major" which can be addressed post GNOME 2.12.
adding keywords
removing keywords
*** Bug 320875 has been marked as a duplicate of this bug. ***
*** Bug 326074 has been marked as a duplicate of this bug. ***
The mail has a lot of blank lines. Similar to 306279.
Every paragraph in a mail should be associated with a direction. When a mail has many blank lines, each CR is treated as a paragraph. To associate a direction to the blank-line, the previous paragraph's dir is acquired using the functions html_object_get_direction and html_clueflow_real_get_direction. In this case, the previous paragraph is also empty. So the function calls proceed until a paragraph with proper direction is obtained. This happens for every blank paragraph Assuming a mail with 100 blank paragraphs... The no of function calls to determine dir for a blank paragraph is... 1st line --> 1 call to object_get_dir, 1 to cluflow_real_get_dir 2nd line --> 2 calls to object_get_dir, 2 to cluflow_real_get_dir 3rd line --> 3 calls to object_get_dir, 3 to cluflow_real_get_dir . . . . . . . . 100th line --> 100 calls to object_get_dir, 100 to cluflow_real_get_dir The total number of function calls to refresh the preview pane for 100 blank lines amounts to 100! +100! (Huh...) This mail with more than 25000 blank lines would definitely eat the processor. Why should we put in so much effort to get the direction for a paragraph that has nothing?
Created attachment 59229 [details] [review] patch
*** Bug 306279 has been marked as a duplicate of this bug. ***
Reviewed and committed in HEAD and the gnome-2-14 branches.