commit 440fc95942470fc833f02ea27661030496b0a37e
parent 330a06434e48a38df6237608542aba588135ae60
Author: Simon Kornblith <simon@simonster.com>
Date: Wed, 24 Aug 2011 01:59:56 +0000
Move startup timing to zotero-service.js
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -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');
diff --git a/components/zotero-service.js b/components/zotero-service.js
@@ -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");