Closed Bug 164404 Opened 22 years ago Closed 22 years ago

100% load of CPU during mozilla's mail client starting

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asherman, Assigned: Bienvenu)

References

Details

(Keywords: perf)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020822
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020822

When i start mail client window with enabled chek IMAP server for new messages
at start up, that opens and does nothing for one or half minute, with CPU load
being 100%. And if i open any url at the same time in new window, it shows
"Resolving host for ..." until mail client goes to normal mode. 

Reproducible: Always

Steps to Reproduce:
1. -
2. -
3. -

Actual Results:  
-

Expected Results:  
-
Keywords: perf
Is this new behaviour? can you attach an imap protocol log?

http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap
Yes that is relatively new bug. There was no the bug at least in build 20020810...

And the IMAP log file seems to be clear during establishing the connection with
100% cpu usage.

Another comment: while loading any message the cpu usage is also 100%,even if
connection has been already established.
This bug can be observed when i launch mail window first ("C:\Program
Files\mozilla.org\mozilla\mozilla.exe" -mail). There is no the bug when is
launch at first just brouser ("C:\Program Files\mozilla.org\mozilla\mozilla.exe").
Excuse me for my importunity, but.
I've got dial-up connection to internet. Before this bug in older builds when i
launched mozilla mail and connection to internet had been broken, there was
immediately message - Failed to connect to server mail.ksu.ru. But now that is
only after some time (half minute), with cpu usage being 100% during this time.
My cpu is AthlonXP 1600+ ;-).
taking, and fix upcoming.
Assignee: mscott → bienvenu
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch proposed fixSplinter Review
If we didn't get any data from the stream, sleep for 50 milliseconds to avoid
hogging cpu - otherwise, hog away!
Comment on attachment 96686 [details] [diff] [review]
proposed fix

sr=sspitzer
Attachment #96686 - Flags: superreview+
This change makes it so if we didn't get any data from the stream, we sleep for
50 milliseconds before processing pending events. This makes us behave more or
less like we used to in the case where we haven't gotten any data, but should
still allow us to process data as quickly as possible when there is data. I
tried putting in a PR_Sleep(PR_INTERVAL_NO_WAIT) instead, but I still saw CPU
useage go up to 100% while waiting for data.
Comment on attachment 96686 [details] [diff] [review]
proposed fix

r=mscott

I'll try it out on my opt. build later today but I didn't want to hold up the
train on this getting in.
Attachment #96686 - Flags: review+
*** Bug 164632 has been marked as a duplicate of this bug. ***
fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
My bug 164632 is not during the IMAP startup. It is during the download of
attachments. 
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I will try tomorrow's build....
no reason to re-open this bug.
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
QA Contact: huang → gchan
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: