Adds more garbage collection settings #1896
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHAT
🤖 Generated by Copilot at d3992b2
This pull request adds new settings to control FSAC's garbage collection and deprecates
conserveMemory
. It updatespackage.json
andLanguageService.fs
to reflect these changes.🤖 Generated by Copilot at d3992b2
🗑️🚀🗃️
WHY
FSharp.fsac.conserveMemory
and addedFSharp.fsac.gc.conserveMemory
. I think it's reasonable to allow people to configure this with whatever value they want. Defaulted it to off.FSharp.fsac.gc.heapCount
with a default value of 2. This should allow us to still get some benefits of server GC while not having a heap per core which could look like we're using more memory than we should.FSharp.fsac.gc.server
with default value of on. We do ship FSAC with this on but this allows people to turn it off if they really want to have a bit more control over their memory.HOW
🤖 Generated by Copilot at d3992b2
FSharp.fsac.conserveMemory
setting inpackage.json
and show a message to useFSharp.fsac.gc.conserveMemory
instead (link)FSharp.fsac.gc.conserveMemory
,FSharp.fsac.gc.heapCount
, andFSharp.fsac.gc.server
settings inpackage.json
with default values, descriptions, and validation rules (link)conserveMemory
option withgcConserveMemory
,gcHeapCount
, andgcServer
options ingetOptions
function inLanguageService
module insrc/Core/LanguageService.fs
and assign them the values from the settings (link)DOTNET_GCHeapCount
,DOTNET_GCConserveMemory
, andDOTNET_GCServer
environment variables to FSAC process inspawnNetCore
function inLanguageService
module insrc/Core/LanguageService.fs
and formatDOTNET_GCHeapCount
as hexadecimal (link)7.8.1
inpackage.json
(link)