fix slow scrolling in folder pane when .msf files are missing or damaged, r/sr=standard8, 469448
authorDavid Bienvenu <bienvenu@nventure.com>
Mon, 02 Feb 2009 13:44:50 -0800
changeset 1837 c947894c64e0c09024f7261b30b4def0d46fedca
parent 1836 edb3e85438a6a62548b91a96753c57ff47cfabcf
child 1838 500ab5266b589051ccdbb06c78753f949d5b8e1c
push idunknown
push userunknown
push dateunknown
bugs469448
fix slow scrolling in folder pane when .msf files are missing or damaged, r/sr=standard8, 469448
mailnews/base/util/nsMsgDBFolder.cpp
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -702,16 +702,22 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo
           nsresult rv;
           rv = db->HasNew(&hasnew);
           if (NS_FAILED(rv)) return rv;
           if (!hasnew && mNumPendingUnreadMessages <= 0)
             ClearFlag(nsMsgFolderFlags::GotNew);
         }
       }
     }
+    else {
+      // we tried to open DB but failed - don't keep trying.
+      // If a DB is created, we will call this method with force == TRUE,
+      // and read from the db that way.
+      mInitializedFromCache = PR_TRUE;
+    }
     if (db)
       db->Close(PR_FALSE);
   }
   return result;
 }
 
 nsresult nsMsgDBFolder::SendFlagNotifications(nsIMsgDBHdr *item, PRUint32 oldFlags, PRUint32 newFlags)
 {