microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.7k stars 769 forks source link

Painfully slow autocomplete suggestions if you type fast #5297

Closed amalrajan closed 8 months ago

amalrajan commented 9 months ago

Environment data

Repro Steps

When I type fast (>100wpm), I can notice a slight delay between pressing the key on the keyboard and the characters appearing and the autocomplete suggestion popup appearing. Barely noticeable if you do 60wpm or so.

This issue disappears when I disable Pylance extension.

Also, this never was an issue a few months ago (before September 2023). I'm gonna switch to Pycharm temporarily as this issue is really annoying, even though overall, I really prefer the autcomplete on this plugin

bschnurr commented 9 months ago

Thank you for logging an issue. Do you have a public code repository or code sample to test with?

a video would help too. thank you

heejaechang commented 9 months ago

thank you for the reporting! but we will need some sample code otherwise, it will be hard for us to figure out what code path is causing an issue.

amalrajan commented 9 months ago

I couldn't see any difference when I watched a 10x slomo screen capture of pycharm and vscode (I simulated typing the same block of code on both editors at 120wpm). However, I can still feel a tiny bit of input lag on vscode between pressing a key on the keyboard and the characters appearing. It feels instantaneous on pycharm.

Second, disabling pylance seems to improve the perceived latency.

I'm wondering if this is somehow related to 'Zero-latency typing' https://github.com/microsoft/vscode/issues/27378 ?

rchiodo commented 8 months ago

Without a repro it's impossible for us to pinpoint what might be taking longer. @Heejaechang has a fix in the works for an overload problem: https://github.com/microsoft/pylance-release/issues/5268?

I'm going to close this without any specific repro though.