Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1386635 #17

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Microsoft.VisualStudio.FSharp.Editor
open System
open System.ComponentModel.Composition
open System.Diagnostics
open System.Reflection
open Microsoft.CodeAnalysis
open FSharp.Compiler
open FSharp.Compiler.SourceCodeServices
Expand Down Expand Up @@ -64,6 +65,12 @@ type internal FSharpCheckerProvider
enableBackgroundItemKeyStoreAndSemanticClassification = false) // This option crashes on Mono due to MemoryMappedFile usage
//enablePartialTypeChecking = true)

// HACK: VSMAC - Set MaxMemoryReached flag to true to prevent repeated calls to GC.GetTotalMemory in service.fs CheckMaxMemoryReached which can be slow on Mono
// We can remove this hack once we have migrated to dotnet
let field = checker.GetType().GetField("maxMemoryReached", BindingFlags.NonPublic ||| BindingFlags.Instance)
field.SetValue(checker, true);


// This is one half of the bridge between the F# background builder and the Roslyn analysis engine.
// When the F# background builder refreshes the background semantic build context for a file,
// we request Roslyn to reanalyze that individual file.
Expand Down