commit 12bea4b7eaadd4ce44a73cead4fb41b94dc7a233
parent 3ff1ff88a910dd7aec603e9039fe7a9bd5332703
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 23 Jun 2015 16:03:05 -0400
Notifier observer time logging
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/notifier.js b/chrome/content/zotero/xpcom/notifier.js
@@ -139,7 +139,12 @@ Zotero.Notifier = new function(){
// Catch exceptions so all observers get notified even if
// one throws an error
try {
+ let t = new Date;
yield Zotero.Promise.resolve(_observers[id].ref.notify(event, type, ids, extraData));
+ t = new Date - t;
+ if (t > 5) {
+ Zotero.debug(id + " observer finished in " + t + " ms");
+ }
}
catch (e) {
Zotero.debug(e);