Description
In FSharpProjectOptionsManager.fs, onChangeCaretHandler calls updateProjectOptions on every caret position change. This in turn calls checker.NotifyFileChanged(document.FilePath, scriptProjectOptions) |> Async.Start, asking FCS to re-evaluate script options, potentially triggering a new parse and #r/#load resolution on every keystroke/caret move.
Call chain
User moves caret → IVsTextViewEvents.OnChangeCaretLine → onChangeCaretHandler → updateProjectOptions → Async.Start(checker.NotifyFileChanged(...)) → FCS script options resolution.
Fix
Debounce updateProjectOptions: use a CancellationTokenSource that is swapped/cancelled on each call and only actually notifies after a 500ms idle period, implemented as a cancellableTask using Task.Delay(500, ct).
Priority
P2 (medium-term)
Description
In
FSharpProjectOptionsManager.fs,onChangeCaretHandlercallsupdateProjectOptionson every caret position change. This in turn callschecker.NotifyFileChanged(document.FilePath, scriptProjectOptions) |> Async.Start, asking FCS to re-evaluate script options, potentially triggering a new parse and#r/#loadresolution on every keystroke/caret move.Call chain
User moves caret →
IVsTextViewEvents.OnChangeCaretLine→onChangeCaretHandler→updateProjectOptions→Async.Start(checker.NotifyFileChanged(...))→ FCS script options resolution.Fix
Debounce
updateProjectOptions: use aCancellationTokenSourcethat is swapped/cancelled on each call and only actually notifies after a 500ms idle period, implemented as acancellableTaskusingTask.Delay(500, ct).Priority
P2 (medium-term)