vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Lazy loading for the intellisense? [Feature request]

Open ItsCubeTime opened this issue 3 years ago • 4 comments

Alternatively if you could add an option to limit how many suggestions can be loaded at most (if this doesnt exist already, if so please enlighten me).The purpose of course being making the intellisense just slightly snappier :)

LLVM's clangd extension limits to about a 100 entries (or so), when comparing the 2 extensions with quickSuggestionsDelay set to 0, the amount of time it takes for clangd to load the entries is quite a noticeably lot faster (and I believe it might just be because it doesnt load houndreds of entries, hehe) and at the end of the day theres really no point loading that many suggestions anyway.

Thanks for reading <3

ItsCubeTime avatar Feb 02 '21 21:02 ItsCubeTime

The number of suggestions offered by IntelliSense shouldn't affect performance significantly. Do you only get slow performance in cases where autocomplete has > 100 entries? If you can give an example that illustrates the performance issue we could see what could be done to increase performance.

sean-mcmanus avatar Feb 02 '21 21:02 sean-mcmanus

Hi @sean-mcmanus and thanks for your reply.

It doesnt quite seem to matter how many entries are displayed in the suggestions list at once. However how many entries are available in the scope all and all.

Like for instance when Im typing something like <class name/type>. you get suggestions based on available methods quite immidiatly, compared to when in a larger scope it can take quite significantly longer when working in larger applications.

The video demo below is when working in a Unreal Engine project.

https://u.teknik.io/jM4dn.mp4

ItsCubeTime avatar Feb 03 '21 09:02 ItsCubeTime

It looks like you're referring to the large completions for globals, which currently maxes at 1000 results, and from your video, the delay is not very large, but I'm able to get up to around 2 seconds of delay in some cases. So it is possible adding a setting to limit the global results to 100 would make that faster. I think we already so some caching to improve performance, but it's possible more could be done too.

sean-mcmanus avatar Feb 04 '21 18:02 sean-mcmanus

It looks like you're referring to the large completions for globals, which currently maxes at 1000 results, and from your video, the delay is not very large, but I'm able to get up to around 2 seconds of delay in some cases. So it is possible adding a setting to limit the global results to 100 would make that faster. I think we already so some caching to improve performance, but it's possible more could be done too.

Oh my god 2s delay. Do you have any plans to optimize this extension now? Even sub-perceptual pauses add up over the course of a day to create unnecessary stress.

kouhe3 avatar Jul 20 '22 03:07 kouhe3