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

Adds more garbage collection settings #1896

Merged
merged 2 commits into from
Jul 23, 2023

Conversation

TheAngryByrd
Copy link
Member

@TheAngryByrd TheAngryByrd commented Jul 22, 2023

WHAT

🤖 Generated by Copilot at d3992b2

This pull request adds new settings to control FSAC's garbage collection and deprecates conserveMemory. It updates package.json and LanguageService.fs to reflect these changes.

🤖 Generated by Copilot at d3992b2

If you use FSAC for F# coding
You might want to tweak its eroding
Of memory and heap
With settings more deep
Than conserveMemory, now exploding

🗑️🚀🗃️

WHY

  • Deprecated FSharp.fsac.conserveMemory and added FSharp.fsac.gc.conserveMemory. I think it's reasonable to allow people to configure this with whatever value they want. Defaulted it to off.
  • Added 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.
  • Added 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

  • Add and update settings for FSAC garbage collector configuration (link, link, link, link)
  • Deprecate FSharp.fsac.conserveMemory setting in package.json and show a message to use FSharp.fsac.gc.conserveMemory instead (link)
  • Add FSharp.fsac.gc.conserveMemory, FSharp.fsac.gc.heapCount, and FSharp.fsac.gc.server settings in package.json with default values, descriptions, and validation rules (link)
  • Replace conserveMemory option with gcConserveMemory, gcHeapCount, and gcServer options in getOptions function in LanguageService module in src/Core/LanguageService.fs and assign them the values from the settings (link)
  • Pass DOTNET_GCHeapCount, DOTNET_GCConserveMemory, and DOTNET_GCServer environment variables to FSAC process in spawnNetCore function in LanguageService module in src/Core/LanguageService.fs and format DOTNET_GCHeapCount as hexadecimal (link)
  • Bump up extension version to 7.8.1 in package.json (link)

@TheAngryByrd TheAngryByrd requested a review from baronfel July 22, 2023 03:30
@baronfel baronfel merged commit db2c0ea into ionide:main Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants