From 53ff8eecd29351994667742c14c6b8669d1f791a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 3 Dec 2019 16:00:04 -0700 Subject: [PATCH] Limit autocomplete to 25 results I'm not totally sure why we didn't do this years ago, but this fixes performances problems in the new React tags box, and should improve autocomplete performance generally in large libraries. --- components/zotero-autocomplete.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/zotero-autocomplete.js b/components/zotero-autocomplete.js index da3a70a607..f376cbed65 100644 --- a/components/zotero-autocomplete.js +++ b/components/zotero-autocomplete.js @@ -211,6 +211,8 @@ ZoteroAutoComplete.prototype.startSearch = Zotero.Promise.coroutine(function* (s sql += "ORDER BY value"; } + sql += " LIMIT 25"; + var onRow = null; // If there's a result callback (e.g., for sorting), don't use a row handler if (!resultsCallback) {