Browse Source

Show only first 100 results to prevent lag

master
Kenneth Bruen 2 years ago
parent
commit
f4ae034812
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 5
      train.js

5
train.js

@ -53,6 +53,11 @@ function rebuildSuggestions() {
}) })
} }
// Trim the amount of results displayed
if (suggestions.length > 100) {
suggestions.splice(100)
}
suggestions.forEach(function (suggestion, index) { suggestions.forEach(function (suggestion, index) {
var suggestionLi = document.createElement('li') var suggestionLi = document.createElement('li')
suggestionsArea.appendChild(suggestionLi) suggestionsArea.appendChild(suggestionLi)

Loading…
Cancel
Save