Skip to content

Add troubleshooting note about slow IntelliSense results in PowerShell v5 #361

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

Closed
daviwil opened this issue Dec 7, 2016 · 10 comments
Closed
Assignees
Labels
Issue-Bug A bug to squash.
Milestone

Comments

@daviwil
Copy link
Contributor

daviwil commented Dec 7, 2016

I've heard from a couple people recently that IntelliSense results are sometimes slow to return. I'd like to investigate the cause of that issue.

@GHRoss: could you give me more details about the IntelliSense slowness that you reported here? Does it only give you 30 seconds delay on the first time you get IntelliSense in an editing session or every single time? Can you give me a more complete picture of what's going on?

It'd be great if you could capture some logs for me by following these instructions. Start up a fresh VS Code session and reproduce the IntelliSense logs then zip them up an email them to me at daviwil [at] microsoft.com.

@daviwil daviwil added this to the 0.8.0 milestone Dec 7, 2016
@daviwil daviwil added the Issue-Bug A bug to squash. label Dec 7, 2016
@daviwil daviwil self-assigned this Dec 7, 2016
@GHRoss
Copy link

GHRoss commented Dec 7, 2016

Hi David,

No problem. I've sent the logs over to you.

I can only describe the problem as typing, for example...

Get-Chil

And then having to wait for Intellisense to catch up.

If it makes any difference, I've just tried this on an old computer, and Intellisense it instant.

The only difference I can think of is that the old machine is running PowerShell 5.1 and my current machine is running 5.0.

@GHRoss
Copy link

GHRoss commented Dec 7, 2016

I'm actually seeing very different results on both computers.

Here is what I see on my current machine...

1

And here is what I see on my old machine (and believe to be what I should be seeing).

2

@daviwil
Copy link
Contributor Author

daviwil commented Dec 7, 2016

Judging from the logs, it seems that IntelliSense takes about 10 seconds to return for cmdlet names but it's pretty much instant for cmdlet parameters. Is that correct?

This is pretty weird, my assumption was that Get-Help was causing a problem but it seems that the IntelliSense engine is lagging behind.

@daviwil
Copy link
Contributor Author

daviwil commented Dec 7, 2016

By the way, if you go into the ISE on the same machine do you get the same IntelliSense slowness?

@GHRoss
Copy link

GHRoss commented Dec 8, 2016

In ISE I get...

Intellisense...

Stopping Intellisense...

Intellisense timed out.

This all happens with about 5 seconds.

@GHRoss
Copy link

GHRoss commented Dec 8, 2016

Interestingly I was searching around for a potential solution to this and came across the following article...

http://windowsitpro.com/windows-client/solve-intellisense-hangs-integrated-scripting-environment

I did as it said and deleted all the files.

Upon trying Intellisense again, it hangs for much longer and then the files in that folder are all regenerated.

Then trying Intellisense a final time gives the same error as my previous post.

I have a feeling this is a problem with my PC rather than the extension.

@daviwil
Copy link
Contributor Author

daviwil commented Dec 8, 2016

Thanks, that's really helpful! I'll ask someone if there's a known issue in PowerShell 5.0.

@daviwil
Copy link
Contributor Author

daviwil commented Dec 8, 2016

Looks like this is indeed a known issue with PowerShell 5. It's been fixed in PowerShell 5.1 which explains why IntelliSense works fine for you on your other machine.

@GHRoss
Copy link

GHRoss commented Dec 8, 2016

That's great news! Although I'm in two minds about updating to WMF 5.1 as it's still in preview, my experience can't get much worse at the moment, so I think I'm going to update it as soon as possible.

I guess that means this bug can be closed?

@daviwil
Copy link
Contributor Author

daviwil commented Dec 8, 2016

I'll keep it open to remind myself to put a note in the Troubleshooting document about this in case other people have issues. Thanks again for your help investigating the issue!

@daviwil daviwil changed the title Investigate slow IntelliSense results Add troubleshooting note about slow IntelliSense results in PowerShell v5 Dec 8, 2016
@daviwil daviwil closed this as completed in 9c1a6a5 Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

2 participants