Disable unresponsive script warning during translator initialization, since subsequent runs should be much quicker due to cache
(Change is just an indent, despite messiness of diff)
This commit is contained in:
parent
80f5047687
commit
e17bffcdd4
1 changed files with 88 additions and 80 deletions
|
@ -52,6 +52,10 @@ Zotero.Translators = new function() {
|
|||
var start = (new Date()).getTime();
|
||||
var transactionStarted = false;
|
||||
|
||||
Zotero.UnresponsiveScriptIndicator.disable();
|
||||
|
||||
// Use try/finally so that we always reset the unresponsive script warning
|
||||
try {
|
||||
_cache = {"import":[], "export":[], "web":[], "search":[]};
|
||||
_translators = {};
|
||||
|
||||
|
@ -144,6 +148,10 @@ Zotero.Translators = new function() {
|
|||
for(var type in _cache) {
|
||||
_cache[type].sort(cmp);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
Zotero.UnresponsiveScriptIndicator.enable();
|
||||
}
|
||||
|
||||
Zotero.debug("Cached "+i+" translators in "+((new Date()).getTime() - start)+" ms");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue