Closed Bug 117573 Opened 24 years ago Closed 24 years ago

Reduce calls to addref on mailnews urls upon folder discovery

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID
Future

People

(Reporter: stephend, Assigned: Bienvenu)

Details

Attachments

(2 files)

Build ID: Windows 2000, latest trunk running under Quantify. Summary: Optimize/reduce calls to nsMsgFolder::AddRef Steps to Reproduce: 1. On an IMAP account, bring up mozilla.exe -mail under Quantify. 2. Exit Mozilla. 3. Sort by function in Quantify. Expected Results: I'm not totally sure if my bug is even valid (it's my 1st time using Quantify to attempt to profile startup performance). Please feel free to invalidate as necessary, thanks. Actual Results: The global function nsMsgFolder::AddRef takes 98.3% (2,809 calls) of the time we spend in nsMsgMailNewsUrl:AddRef (which of its own, has 2,858 calls using the above scenario).
Attached image Screenshot of Quantify
I also have the logs of my Quantify startup profile in .qfy and .txt if anybody wants them.
I'm not sure what this has to do with the mail database - the db doesn't addref the folder very often. Looks to me like this would be the folder pane, if anything.
Component: Mail Database → Mail Window Front End
but these functions also take up 0.0% of startup time, so they're not that interesting. How many imap folders do you have? Also, the stack seems suspicious because nsMsgFolder::AddRef is not a caller of nsMsgMailNewsUrl::AddRef, as near as I can tell.
Are you downloading lots of headers in your test case? I basically see calls to addref on the mailnews url whenever we discover a folder (which I can fix), when we download header lines, and when we display progress/status. W/O downloading lots of headers, I don't think we get nearly that many calls to nsMsgMailNewsUrl::AddRef.
There were 12 messages in my IMAP Inbox when I ran this testcase, but I didn't do a GetMsgs, so 12 should be it. It might be helpful to morph this bug from your comment: I basically see calls to addref on the mailnews url whenever we discover a folder (which I can fix)
It only matters how many headers are in your inbox if you had to download those headers during the quantified session, e.g., if the .msf file was out of date. Do you remember if it did?
To answer your question, David, no I didn't download any new headers. I believe the .msf file was correct and complete.
QA Contact: esther → stephend
David, Seth looked at my Quantify run last night, and agreed that the profile (at least for that function) seemed bogus. I'll let you adjust this bug as you see fit now. Sorry for the noise.
Moving to future. It sounds like this might be a wontfix based on comments, so if it is, please update the bug.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Changing summary to reflect the only valid portion of this bug.
Summary: Optimize/reduce calls to nsMsgFolder::AddRef (2,809 on startup) → Reduce calls to addref on mailnews urls upon folder discovery
I checked in some fixes for this, but it sounds like the general profile seems bogus.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
It was, thanks.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: