Closed Bug 178570 Opened 22 years ago Closed 22 years ago

mail startup painfully slow

Categories

(MailNews Core :: Backend, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: Bienvenu, Assigned: naving)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

something regressed in today's checkins, such that startup is really really
slow. It's as if we're opening all the local mail folder db's on startup,
instead of using the folder cache.
Here's the problem:

nsMsgDBFolder::SetStringProperty calls GetDBFolderInfoAndDB, which will open the
db. nsMsgLocalMailFolder::CreateSubFolders(nsFileSpec &path) gets called for
every folder, which means for every local folder, we open the db. 

The reason for the folder cache is that it allows us to avoid opening the db for
every folder on startup. We can't call SetStringProperty on every local folder
every time we start up if it's going to open the db.

The way this should work is that if the pretty name hasn't changed, we shouldn't
be writing to the db. For this to work, we need to make sure that we've tried to
load the folder cache info for the folder by calling ReadDBFolderInfo(PR_FALSE)
proposed fix upcoming.
Keywords: regression
Attached patch proposed fixSplinter Review
this is a temporary fix - make sure the name has changed before setting the
pretty name. I don't know how this will behave with japanese folder names, or
localized builds - it might mean that we open those db's every time on startup
as well, which would be unacceptable. I'm going to hand this over to Navin to
worry about, but we need to fix this ASAP.
-> Navin.
Assignee: bienvenu → naving
Attached patch proposed fix (obsolete) — Splinter Review
We don't need to set the prettyName if we got the name from db/cache in the
first place. Thanks david for catching this. Can you review it ? thx.
Comment on attachment 105285 [details] [diff] [review]
proposed fix

wrong patch!
Attachment #105285 - Attachment is obsolete: true
Attached patch right patchSplinter Review
we need to set the diskname in case folder name is not present in the cache or
the db.
Comment on attachment 105286 [details] [diff] [review]
right patch

r=bienvenu, should work.
Attachment #105286 - Flags: review+
fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
QA Contact: gayatri → laurel
checked on ishmail branch.
Depends on: 117385
This looks OK to me using 2003-01-13 commercial trunk.
Status: RESOLVED → VERIFIED
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

Created:
Updated:
Size: