Bug 333787 r=annie.sullivan Put history init in a transaction for almost immeasurably faster startup times.

This commit is contained in:
brettw%gmail.com 2006-04-13 16:28:06 +00:00
Родитель 4039642bee
Коммит a2117b5f4b
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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.