From 12bea4b7eaadd4ce44a73cead4fb41b94dc7a233 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 23 Jun 2015 16:03:05 -0400 Subject: [PATCH] Notifier observer time logging --- chrome/content/zotero/xpcom/notifier.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/notifier.js b/chrome/content/zotero/xpcom/notifier.js index 17b2c92ea..a824d571c 100644 --- 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);