-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-completion fails due to performance issues #2522
Auto-completion fails due to performance issues #2522
Comments
Does Ctrl+C help? |
In the integrated terminal? For some reason, the integrated terminal is not appearing in my list of terminals. |
Also, seems my PS Session is still using RC.3 even though I upgraded to the GA release. |
It's probably defaulting to preview. Try switching to |
OK, now on PS 7 GA and have PSIC displaying. I had done some experimenting with settings a while back and apparently set showOnStartup to false. Fixed. |
Are you running anything in the time before the completions fail? |
I'm getting sluggish completions, but haven't been able to repro this yet |
No, not running anything. I can do a develop reload window and try auto-completion and initially, it works OK but gets slower. Some context, these couple of PS scripts are in a project that houses an Electron app with several Angular lib projects. That's six |
Wow. Hmm yeah I suspect this is related to that. I think there might be a simple fix here that we've been overlooking for a while, where we need to filter out bad files... I'm thinking of #1256 (comment) |
That just encourages me to get back to work on PSScriptAnalyzer... |
I'm also getting a slow down on auto-complete. Even with a project containing only a few files. |
@rjmholt do you know which release of I think I've seen it recently, but didn't look into it past confirming the thread was stuck getting tab completion for |
1.4.5 I believe
So far as I know, it's only included with PowerShell. But that is a good recommendation. Try updating |
Yep I had a copy at the user level that was 1.4.4, that was getting imported instead of the 1.4.6 at the machine level. Not sure why, I could have sworn it would pull the latest. It may be worth considering including |
Hmmm, that's an idea, although we'd need to import it differently the way the module path works. |
Curious to know if the others in this thread have an old version of PackageManagement hiding. @rkeithhill @mrboring |
@TylerLeonhardt, I have two, one is for 5.1:
System Details
PSModulePath
|
Huh, that's weird. What's |
Also:
|
Sort of a shot in the dark, but maybe worth changing that entry in your |
@SeeminglyScience Thanks for the suggestion. I'll give that a go and let you know how I get on. That said, the slow down in auto-complete has only started recently. The |
@SeeminglyScience I've done the change you suggested and it doesn't make a difference. I've had a bit more time to do testing and find that the issue increases the longer you work on a file. I had a test file with 35 line and by the last line there was a small delay (upt to three seconds, not there on earlier lines). If I switch to another file, do some editing, switch back to the original file, the performance is OK. In my (limited) testing I've not experienced long delays. Maybe that's related to me updating VS Code to 1.43.0, or maybe I've not done enough testing. Previously, after waiting more than ten seconds, I would simply type the required text. The delay I had in testing was relating to I'm trying to create a reproducible test that I can post here. Not easy on this type of issue. |
I've just experienced auto-complete not working. After about 30 seconds I gave up and typed the text. At the same time, I noticed that document formatting stopped working. |
@mrboring try this: Import-Module PackageManagement -PassThru Check which version you're getting when you do that |
This issue has regressed for me with the latest preview release 2020.3.1. Probably best to track in #2590 which i've just found. |
@TylerLeonhardt I've done a brief test with I'll try to do a longer test. After which I'ill need to revert to |
The Pester behavior is configurable:
If youre having trouble with Pester after that setting can you open a new issue? |
@TylerLeonhardt I've created a new issue:
UPDATE: The tests will run if I manually import Pester (4.10.1) first. |
@TylerLeonhardt I've done a longer test with Auto-complete stops working logs.zip
|
I have a PR out to improve performance even more: PowerShell/PowerShellEditorServices#1251 If you would like to give it a go, I'd love the feedback. Download this zip: Extract it and run:
Make sure the regular PowerShell (stable) extension is disabled. Restart VS Code. To verify you've done it correctly, your version number in the extension pane for
|
@TylerLeonhardt I've spend about 90 minutes typing functions (for testing I just duplicated existing functions into a dummy project) and auto-complete has worked perfectly so far. Good performance, with no crashes. |
Nice! At the very least it is an improvement. I'll try to push a PowerShell Preview release today or tomorrow with a Stable release next week. |
I was too busy with urgent work yesterday to try this out, but I've installed it this morning and will see how it goes. Ironically if it works it would have saved me plenty of time with restarts yesterday and today I don't have the same need to do any mad scripting (yet). |
This version is significantly better than before and have not needed to restart in the last 60+ minutes, which was unheard of with the current preview. I've been reworking the script I did yesterday which it would freeze on pretty regularly so things have definitely improved. |
Awesome - this will be live in......... about 10 or so minutes as the PowerShell Preview extension and then if it goes well, Stable will follow next week. |
I will close this as we close issues when the fix is merged in and this has been merged in. |
System Details
System Details Output
Issue Description
Auto-complete was working for about 5 minutes into editing a small script (220 lines) but now it has wedged.
Expected Behaviour
Auto-complete should not ever stop working - in an ideal world. :-)
Actual Behaviour
I get the dreaded "Loading..." message for at least a minute before I give up:
VSCodePSAutoCompleteWedge.zip
1583432852-d0e516fc-13f8-444b-877f-cecf115455871583432271941.zip
Attached Logs
Follow the instructions in the troubleshooting docs
about capturing and sending logs.
1583432852-d0e516fc-13f8-444b-877f-cecf115455871583432271941.zip
The text was updated successfully, but these errors were encountered: