Skip to content

Perf: async project invalidation + debounce script updateProjectOptions - #20126

Open
xperiandri wants to merge 2 commits into
dotnet:mainfrom
xperiandri:fix-project-options-async-debounce
Open

Perf: async project invalidation + debounce script updateProjectOptions#20126
xperiandri wants to merge 2 commits into
dotnet:mainfrom
xperiandri:fix-project-options-async-debounce

Conversation

@xperiandri

Copy link
Copy Markdown
Contributor

Summary

Two perf fixes in FSharpProjectOptionsManager.fs:

  1. Fixes Perf: .Result blocks MailboxProcessor thread in FSharpProjectOptionsManager #20125.Result blocking calls in hasDependentVersionChanged/isProjectInvalidated were blocking the single-threaded MailboxProcessor loop. Converted to async cancellableTask flow.
  2. Fixes Perf: Debounce script updateProjectOptions (fires on every caret move) #20124 — script updateProjectOptions fired on every caret move. Added a 500ms debounce using a swapped CancellationTokenSource and Task.Delay.

Testing

Built successfully; deployed and validated in RoslynDev hive with CPU profiling.

@xperiandri
xperiandri requested a review from a team as a code owner August 3, 2026 00:27
@xperiandri xperiandri changed the title Perf: async project invalidation + debounce script updateProjectOptions Perf: async project invalidation + debounce script updateProjectOptions Aug 3, 2026
…1 resumable-code composition error; async invalidation via cancellableTask and stable emitCache for C# PE references
@github-actions github-actions Bot added the AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Perf: .Result blocks MailboxProcessor thread in FSharpProjectOptionsManager Perf: Debounce script updateProjectOptions (fires on every caret move)

1 participant