This repository was archived by the owner on Jul 31, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,7 +188,10 @@ function activate(context) {
188188 console . warn ( `Unknown symbol type: ${ symbolInfo . type } ` ) ;
189189 return SymbolKind . Variable ;
190190 } ;
191- const symbolConverter = matches => matches . map ( match => {
191+ // NOTE: Workaround for high CPU usage on IPC (channel.onread) when too many symbols returned.
192+ // For channel.onread see issue like this: https://github.com/Microsoft/vscode/issues/6026
193+ const numOfSymbolLimit = 3000 ;
194+ const symbolConverter = matches => matches . slice ( 0 , numOfSymbolLimit ) . map ( match => {
192195 const symbolKind = ( symbolKindTable [ match . type ] || defaultSymbolKind ) ( match ) ;
193196 const uri = vscode . Uri . file ( match . file ) ;
194197 const location = new Location ( uri , new Position ( match . line , match . char ) ) ;
You can’t perform that action at this time.
0 commit comments