Skip to content

Conversation

@TIHan
Copy link
Contributor

@TIHan TIHan commented May 13, 2019

This should resolve some of the performance issues that we saw in scripts, #6250 .

We still have an issue with UI delays in the example presented by @kevmal , but it should be a lot better. I need to look into the UI delays more and figure out why that's happening.

try
// For now, disallow miscellaneous workspace since we are using the hacky F# miscellaneous files project.
if document.Project.Solution.Workspace.Kind = WorkspaceKind.MiscellaneousFiles then
reply.Reply(None)
Copy link
Contributor

@KevinRansom KevinRansom May 13, 2019

Choose a reason for hiding this comment

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

nit braces. and 2 below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea make sense.

}

let rec tryComputeOptions (project: Project) (cancellationToken: CancellationToken) =
let rec tryComputeOptions (project: Project) =
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the comment:
// Because this code can be kicked off before the hack, HandleCommandLineChanges, occurs,

still valid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's still valid.

try
// For now, disallow miscellaneous workspace since we are using the hacky F# miscellaneous files project.
if document.Project.Solution.Workspace.Kind = WorkspaceKind.MiscellaneousFiles then
if cancellationToken.IsCancellationRequested then
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems as if cancellationToken is no longer passed in as an argument to tryComputeOptions so for my education where does this come from?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh i see now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to pass the CT to calls to grab textversion and text. I should not have removed it.

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.

Looks good to me ... nice work.

@TIHan TIHan merged commit 0d13f59 into dotnet:master May 14, 2019
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
* Trying to fix script performance

* Changed cancellation strategy

* Added back cancellationToken
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.

2 participants