perf - pre-compute and cache lower case variants for label, sortText, and filterText

This commit is contained in:
Johannes Rieken
2018-10-02 17:24:55 +02:00
parent 4623835328
commit e808161b9e
5 changed files with 50 additions and 25 deletions

View File

@@ -675,7 +675,11 @@ class SuggestAdapter {
insertText: undefined,
additionalTextEdits: item.additionalTextEdits && item.additionalTextEdits.map(typeConvert.TextEdit.from),
command: this._commands.toInternal(item.command),
commitCharacters: item.commitCharacters
commitCharacters: item.commitCharacters,
// help with perf
_labelLow: item.label.toLowerCase(),
_filterTextLow: item.filterText && item.filterText.toLowerCase(),
_sortTextLow: item.sortText && item.sortText.toLowerCase()
};
// 'insertText'-logic