Move startup timing to zotero-service.js
This commit is contained in:
parent
330a06434e
commit
440fc95942
2 changed files with 4 additions and 4 deletions
|
@ -208,8 +208,6 @@ if(appInfo.platformVersion[0] >= 2) {
|
|||
return false;
|
||||
}
|
||||
|
||||
var start = (new Date()).getTime();
|
||||
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
|
||||
|
@ -451,8 +449,6 @@ if(appInfo.platformVersion[0] >= 2) {
|
|||
|
||||
this.initialized = true;
|
||||
|
||||
Zotero.debug("Initialized in "+((new Date()).getTime() - start)+" ms");
|
||||
|
||||
if(!Zotero.isFirstLoadThisSession) {
|
||||
// trigger zotero-reloaded event
|
||||
Zotero.debug('Triggering "zotero-reloaded" event');
|
||||
|
|
|
@ -265,6 +265,8 @@ function makeZoteroContext(isConnector) {
|
|||
*/
|
||||
function ZoteroService() {
|
||||
try {
|
||||
var start = Date.now();
|
||||
|
||||
if(isFirstLoadThisSession) {
|
||||
makeZoteroContext(false);
|
||||
try {
|
||||
|
@ -284,6 +286,8 @@ function ZoteroService() {
|
|||
}
|
||||
isFirstLoadThisSession = false; // no longer first load
|
||||
this.wrappedJSObject = zContext.Zotero;
|
||||
|
||||
zContext.Zotero.debug("Initialized in "+(Date.now() - start)+" ms");
|
||||
} catch(e) {
|
||||
var msg = typeof e == 'string' ? e : e.name;
|
||||
dump(e + "\n\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue