-
Notifications
You must be signed in to change notification settings - Fork 831
Project cache size option #3330
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
Project cache size option #3330
Conversation
…arpChecker.Create
| <value>Code Fixes</value> | ||
| </data> | ||
| <data name="6011" xml:space="preserve"> | ||
| <value>Language Service Performance</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use "Performance" I think. It is under "Text Editor"
|
|
||
| store.RegisterDefault | ||
| { EnableInMemoryCrossProjectReferences = true | ||
| ProjectCheckCacheSize = 3 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default should be 200 since that's what we shipped in VS2017 (i.e. let's not change the default in this PR)
|
Just two requested edits - otherwise approved! |
dsyme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two requested edits - otherwise approved!
|
OK, will push adjustments soon + the edit box validation by @JohanLarsson |
|
It's ready. |
|
This is ready - @KevinRansom ok to merge |
|
@vasily-kirichenko I see it is set to 200, but I have no idea whether I should increase or decrease it for better performance (also, if it is memory, is it an in-process or out of process memory? In case of the latter, I wouldn't care that much of a high value on a 48GB machine, for in-process I have to be careful, as last time I checked VS2017 was limited to its 32 bit address space). Oh, and while we're at it: if we disable this option entirely, what gets disabled? Any cross-project traversal (like going to definition), or only a subset of such features (i.e. XML documentation)? PS: clicking the question-mark top-right just goes to the homepage |
|
First of all, those two settings are not related. "Enable in-memory cross project references" enables cross-project Go to Declaration, Find Usages, Rename, etc. on dirty sources, i.e. those features work OK on changed projects without needing to build them. The second setting is the project check results cache size, the value is number of projects. You cannot set it to zero because FCS cannot work without a cache for currently edited project. The cache is internal, inside VS x86 process so on large solutions it quickly causes VS to reach > 2GB of private set after which you have no options, but restart it. Setting it to, say, 3 or 5 is fine for memory consumption, but it makes cross project navigation and search and rename practically impossible because it has to recheck all dependent project every time, which can easily take several minutes. So, turn the checkbox off, set the cache size to 5 and don't use any cross project features. |
|
@abelbraaksma Just to add to @vasily-kirichenko's excellent comment here, these are present for fine-tuning performance of Visual Studio on your machine. In general, the toggle for in-memory cross-project references will be of value to you if you have a large amount of projects and a deep dependency chain between them. Difference solutions will vary, so there isn't really a clear answer for when you should turn it off or on. |
|
@vasily-kirichenko & @cartermp: thanks for the excellent explanations! However, with my comment I actually meant to ask you to add at least some form of explanation to the Options form in Visual Studio itself. I may not be the only one who's puzzled and confused by these settings, however valuable they proof to be.
This makes sense, but then I find it mildly odd that the default setting seems to be set to 200? |
|
@dsyme wanted it to be 200 to be "backward compatible" (i.e. not user surprising), because this value was hardcoded. |
* add option to disable in-memory cross-project references * fix build * add "Language Service Performance" option page * (wip) add "Project Check Cache Size" option * pass Settings.LanguageServicePerformance.ProjectCheckCacheSize to FSharpChecker.Create * address the code review * rename property page, validate project check cache size
* add option to disable in-memory cross-project references * fix build * add "Language Service Performance" option page * (wip) add "Project Check Cache Size" option * pass Settings.LanguageServicePerformance.ProjectCheckCacheSize to FSharpChecker.Create * address the code review * rename property page, validate project check cache size


It's based on #3328 and should be merged after it.