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

fix script editing perf #10159

Merged
merged 2 commits into from
Sep 19, 2020
Merged

fix script editing perf #10159

merged 2 commits into from
Sep 19, 2020

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
Member

@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
Co-authored-by: Don Syme <donsyme@fastmail.com>
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
Co-authored-by: Don Syme <donsyme@fastmail.com>
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
Co-authored-by: Don Syme <donsyme@fastmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants