зеркало из https://github.com/mozilla/pjs.git
Bug 333787 r=annie.sullivan Put history init in a transaction for almost immeasurably faster startup times.
This commit is contained in:
Родитель
511ea49371
Коммит
9c5f32f290
|
@ -432,6 +432,8 @@ nsNavHistory::InitDB(PRBool *aDoImport)
|
|||
rv = mDBService->OpenDatabase(dbFile, getter_AddRefs(mDummyDBConn));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mozStorageTransaction transaction(mDBConn, PR_FALSE);
|
||||
|
||||
// Initialize the other places services' database tables. We do this before:
|
||||
//
|
||||
// - Starting the dummy statement, because once the dummy statement has
|
||||
|
@ -530,6 +532,9 @@ nsNavHistory::InitDB(PRBool *aDoImport)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
rv = transaction.Commit();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// --- PUT SCHEMA-MODIFYING THINGS (like create table) ABOVE THIS LINE ---
|
||||
|
||||
// now that the schema has been finalized, we can initialize the dummy stmt.
|
||||
|
|
Загрузка…
Ссылка в новой задаче