From 5c4565288748eb2dc992be21456d2f0c35e011f5 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 15 Jun 2017 18:22:51 -0400 Subject: [PATCH] Try to reduce impact of full-text content processor - Don't start checking for idle until UI is ready + 30 seconds - Increase idle delay from 5 seconds to 30 seconds - Increase interval from 100 ms to 200 ms --- chrome/content/zotero/xpcom/fulltext.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index 0d90317c1..23abb9033 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -65,7 +65,7 @@ Zotero.Fulltext = Zotero.FullText = new function(){ var _pdfInfo = null; // nsIFile to executable var _idleObserverIsRegistered = false; - var _idleObserverDelay = 5; + var _idleObserverDelay = 30; var _processorTimer = null; var _processorBlacklist = {}; var _upgradeCheck = true; @@ -99,7 +99,7 @@ Zotero.Fulltext = Zotero.FullText = new function(){ yield this.registerPDFTool('converter'); yield this.registerPDFTool('info'); - this.startContentProcessor(); + Zotero.uiReadyPromise.delay(30000).then(() => this.startContentProcessor()); Zotero.addShutdownListener(this.stopContentProcessor.bind(this)); }); @@ -1092,7 +1092,7 @@ Zotero.Fulltext = Zotero.FullText = new function(){ function () { Zotero.Fulltext.processUnprocessedContent(itemIDs); }, - 100, + 200, Components.interfaces.nsITimer.TYPE_ONE_SHOT ); }