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

FSharp.Interactive.Session.bufferEvent causing UI delays that are 5 > x >= 2 seconds #6077

Closed
cartermp opened this issue Jan 10, 2019 · 6 comments
Labels
Area-VS-FSI VS window and commands for F# Interactive Feature Improvement

Comments

@cartermp
Copy link
Contributor

From my UI delays:

image

This function is the source:
https://github.com/Microsoft/visualfsharp/blob/fead0aac540485683f694524eadad79983ec28d9/vsintegration/src/FSharp.VS.FSI/sessions.fs#L80-L124

I believe the whole thing runs on the UI thread which isn't inherently bad, but a >=2 second delay is a bit much.

@cartermp cartermp added Tenet-Performance Area-VS-FSI VS window and commands for F# Interactive labels Jan 10, 2019
@cartermp cartermp added this to the 16.0 milestone Jan 10, 2019
@abelbraaksma
Copy link
Contributor

Does this happen when you type in FSI inside VS? Or is this called when typing in the main code window, inside some large project?

@cartermp
Copy link
Contributor Author

This is inside VS only, and based on my understanding, when you interact with the FSI window there:

https://github.com/Microsoft/visualfsharp/blob/fead0aac540485683f694524eadad79983ec28d9/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs#L212-L215

@jackmott
Copy link
Contributor

jackmott commented Feb 5, 2019

Maybe a concurrentqueue would perform better here?

@cartermp
Copy link
Contributor Author

cartermp commented Feb 5, 2019

I doubt a ConcurrentQueue would help. It runs this routine on the UI thread.

@jackmott
Copy link
Contributor

jackmott commented Feb 5, 2019

What are the locks for? Just in case the Timer fires off the function at overlapping intervals? Could we make that impossible and not need locks?

Alternatively could we use the C# Queue here instead of a linkedlist for better memory locality?

@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@cartermp
Copy link
Contributor Author

I haven't reproduced this at all and my UI delays internally don't show this either. Will close this out since others haven't really noticed anything significant.

@cartermp cartermp removed this from the Backlog milestone Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VS-FSI VS window and commands for F# Interactive Feature Improvement
Projects
None yet
Development

No branches or pull requests

4 participants