Skip to content
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

Intellisense after closing a solution and opening another one? #18254

Open
Thorium opened this issue Jan 20, 2025 · 4 comments
Open

Intellisense after closing a solution and opening another one? #18254

Thorium opened this issue Jan 20, 2025 · 4 comments
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Needs-Repro
Milestone

Comments

@Thorium
Copy link
Contributor

Thorium commented Jan 20, 2025

I updated my VS to latest version (17.12.4) and first of all I have to say things have improved a lot from what it was a few months ago:

  1. The solution and intellisense loads fast (seconds, not minutes)
  2. And the memory consumption is around 2GB which is not bad.
  3. And both of these despite using a lot of TypeProvider instances of many providers (FSharp.Data, SwaggerProvider, SQLProvider, ...)

So thanks for that!

Only a minor issue I found: If I close a solution and open another one without closing Visual Studio, then the intellisense doesn't load.

I tried twice with different F# solutions, did happen on both times: First loads fine, second time not.

No worries, workaround is just to restart VS between switching solutions.

Provide any related information (optional):

  • Operating system: Win 11
  • .NET Runtime kind: 9.0.102. Solution has it all: .Net standard libraries, .Net 9 executable and .Net Framework 4.8 executable
  • Editing Tools (e.g. Visual Studio Version, Visual Studio): VS 2002 17.12.4
@majocha
Copy link
Contributor

majocha commented Jan 21, 2025

It is possibly TP related because there are some solutions that I can switch between with no issue.
The thing is, we reuse the checker between solutions and only clear some caches on solution close. Apparently this does not always work:

member _.OnAfterCloseSolution(_) =
projectManager.Checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients()
metadataAsSource.ClearGeneratedFiles()
projectManager.ClearAllCaches()
VSConstants.S_OK

@T-Gro
Copy link
Member

T-Gro commented Jan 22, 2025

@0101 : Is cache clearing, incl. TP's, different enough with TransparentCompiler to try that with it?

@0101
Copy link
Contributor

0101 commented Jan 22, 2025

@0101 : Is cache clearing, incl. TP's, different enough with TransparentCompiler to try that with it?

I think this cache should be keyed by project, so it shouldn't be reused in a different solution. Unless type providers have some other cache somewhere. Could be worth a try. (Options F# -> Advanced -> Use Transparent Compiler (at your own risk 😄))

Also a bit suspicious that it happened in 17.12 update, don't think we've touched anything related there?

If we had some minimal repro we could take a look at what's happening.

@T-Gro
Copy link
Member

T-Gro commented Jan 27, 2025

@Thorium : Could you please send a link to a repro project where this happens?

@T-Gro T-Gro added the Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Needs-Repro
Projects
Status: New
Development

No branches or pull requests

4 participants