Show only first 100 results to prevent lag
This commit is contained in:
parent
5531f908af
commit
f4ae034812
1 changed files with 5 additions and 0 deletions
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) {
|
||||
var suggestionLi = document.createElement('li')
|
||||
suggestionsArea.appendChild(suggestionLi)
|
||||
|
|
Loading…
Add table
Reference in a new issue