Skip to content

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Sep 19, 2020

This fixes three script editing perf issues in Visual Studio

  1. Slow down in Visual Studio Preview with Package references for F# scripts

    The processing of dependency resolutions is now cached in dependency providers. Editing scripts containing #r "nuget..." is now respectably fast.

    A lot of processing still happens when preparing project options but because of 2 & 3 this happens in the background.

  2. Use of CSVProvider with inferRows leads to UI delays

    This is because operations related to pasting and formatting of code which are running on the UI thread (or synchronizing with it) were requiring precise options for scripts. This is not necessary in practice for such simple operations requiring only the parsing options, which are going to be available as a result of background requests.

  3. Pasting and hitting "return" in scripts with complex #load dependencies could take a long time. Again this is because operations running on the UI thread were requiring precise options for scripts., see FSharpSynchronousIndentationService is, well, UI synchronous #10156

The fix also threads better userOpName diagnostics information through FSharp.Editor (so the FCS reactor logging shows what user operation is causing the long pauses on the reactor thread)

Copy link
Contributor

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it will help a lot. I'm sorry you don't like old-school type annotations though :-)

@cartermp
Copy link
Contributor

@dsyme also confirmed that renaming doesn't hose the script, which is great since that was one of the motivators behind the big work done in this area in VS 2019.

@cartermp cartermp merged commit 7e4b03f into dotnet:main Sep 19, 2020
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
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.

Slow down in Visual Studio Preview with Package references for F# scripts Use of CSVProvider with inferRows leads to UI delays

3 participants