mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
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:
parent
3ec9e0aaec
commit
a88fa8fca1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user