From c5581112692fce06ce226124b6c3862b51d1a200 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 28 Apr 2010 20:43:06 +0000 Subject: [PATCH] - Add a Zotero.wait() to translator caching, which I may or may not have tried before and which may or may not improve Firefox responsiveness during translator caching - Only check first 1024 chars of translator file for JSON Not going on the 2.0 branch --- chrome/content/zotero/xpcom/translate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js index 296202e9c..a2d62a796 100644 --- a/chrome/content/zotero/xpcom/translate.js +++ b/chrome/content/zotero/xpcom/translate.js @@ -78,6 +78,8 @@ Zotero.Translators = new function() { } } } + + Zotero.wait(); i++; } @@ -226,7 +228,7 @@ Zotero.Translators = new function() { */ Zotero.Translator = function(file) { // Maximum length for the info JSON in a translator - const MAX_INFO_LENGTH = 4096; + const MAX_INFO_LENGTH = 1024; const infoRe = /{(?:(?:"(?:[^"\r\n]*(?:\\")?)*")*[^}"]*)*}/; this.file = file;