Don't spin a nested event loop on most startups

This commit is contained in:
Simon Kornblith 2012-01-27 00:02:20 -05:00
parent d3ddc03dc6
commit a0d7472859

View File

@ -131,9 +131,8 @@ Zotero.Schema = new function(){
// If upgrading userdata, make backup of database first
if (dbVersion < schemaVersion){
Zotero.DB.backupDatabase(dbVersion);
}
Zotero.wait(1000);
Zotero.wait(1000);
}
Zotero.DB.beginTransaction();
@ -159,14 +158,14 @@ Zotero.Schema = new function(){
if (Zotero.DB.tableExists('customItemTypes')) {
this.updateCustomTables(up2);
}
Zotero.wait();
if(up2) Zotero.wait();
var up1 = _migrateUserDataSchema(dbVersion);
var up3 = _updateSchema('triggers');
// Update custom tables again in case custom fields were changed during user data migration
if (up1) {
this.updateCustomTables();
}
Zotero.wait();
if(up1) Zotero.wait();
Zotero.DB.commitTransaction();
}