fix for #103446. improve folder pane perfomance by not calling

SetPrefFlags() *every time* GetSubFolders() is called.

that's really expensive (we copy all the urls from the identity) and we get
access prefs.  not something we should do when painting.

r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2001-10-06 08:38:19 +00:00
parent 3ec9e0aaec
commit a88fa8fca1

View File

@ -480,6 +480,10 @@ nsMsgLocalMailFolder::GetSubFolders(nsIEnumerator* *result)
rv = CreateSubFolders(path);
if (NS_FAILED(rv)) return rv;
// must happen after CreateSubFolders, or the folders won't exist.
// don't call this more than necessary, it's expensive
SetPrefFlag();
// must happen after CreateSubFolders, or the folders won't exist.
if (createdDefaultMailboxes && isServer) {
nsCOMPtr<nsIFolder> rootFolder;
@ -494,11 +498,6 @@ nsMsgLocalMailFolder::GetSubFolders(nsIEnumerator* *result)
mInitialized = PR_TRUE; // XXX do this on failure too?
}
rv = mSubFolders->Enumerate(result);
if (isServer)
{
// *** setting identity pref special folders flag
SetPrefFlag();
}
return rv;
}