microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.05k stars 29.21k forks source link

Big delays sometimes in Terminal suggest #226186

Open TylerLeonhardt opened 2 months ago

TylerLeonhardt commented 2 months ago

Steps to Reproduce:

  1. create a new terminal (PowerShell) with Terminal suggest
  2. start typing

https://github.com/user-attachments/assets/df6c331f-1d62-47dc-98db-d30e1b177dab

You can see the delay between me typing and things actually happening. I feel like there needs to be some debouncing or something.

I can share my profile with you if you want

TylerLeonhardt commented 2 months ago

https://github.com/user-attachments/assets/d2a2f9ec-080c-4910-84f0-6307839d810e

Another instance of this where I typed cls really fast, but it only types c and then stalls.

Tyriar commented 2 months ago

@TylerLeonhardt is this macOS? There's a known issue where the completions can stall as there's some logic that will pause input events in order to verify completions come back now. This was needed to stop corruption in the command line on macOS only as it was printing the sequences it was send while working on the completions (must be sync).

Also, the first time you do something that would request completions after enabling the feature will send "global" completions over which can take a second. It will also at that time activate git and code completions which add a little overhead too.

TylerLeonhardt commented 2 months ago

Yes macOS. Sorry forgot to mention that

Tyriar commented 2 months ago

In that case, we have https://github.com/microsoft/vscode/issues/226187 tracking pastes. This can track the issue with the verification being slow.

For slowness on first input there's an issue tracking a loading indicator which covers that.