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

Sending text to FSI is very slow #1412

Closed
SchlenkR opened this issue Sep 2, 2020 · 8 comments
Closed

Sending text to FSI is very slow #1412

SchlenkR opened this issue Sep 2, 2020 · 8 comments
Labels
upstream - vscode issue Problems and suggestions that are related to or require changes in VSCode

Comments

@SchlenkR
Copy link

SchlenkR commented Sep 2, 2020

Sending text to fsi (can be strings or just code in general) takes a very long time compared to Rider or Visual Studio. You can see the behaviour here:

demo

When sending larger sources to FSI, this can be very annoying and it lowers the "working with data in F#" experience drastically. I don't know where exactly this is coming from. What I can tell is that it makes my use cases almost unusable - sometimes output is even slower than shown in the GIF. This behaviour can also be seen when you run things like this:

seq {
    for x in 1..5000 do "test"
}
|> String.concat " "

...or when you display a response from a webserver.

When I simply send text to a vi (bash) in vscode, the text is displayed immediately.

I know that there was an issue like that here, but I don't find it anymore.

If I can assist you somehow, please let me know.

Hint: This is independent from the usage of .Net 5 preview / .Net 461 / .Net Core version.

  • Operating system: Windows_NT
  • Arch: x64
  • VSCode: 1.48.2
  • Runtime: netcore
  • Dotnet version: 5.0.100-preview.8.20417.9
  • MSBuild version:
Microsoft (R)-Build-Engine, Version 15.9.21+g9802d43bc3 f�r .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
@open-collective-bot
Copy link

Hey @ronaldschlenker 👋,

Thank you for opening an issue. We will get back to you as
soon as we can. Also, check out our OpenCollective and consider
backing us.

https://opencollective.com/ionide

PS.: We offer backer support for all backers. Don't forget to add backer label when you start backing us 😄

@Krzysztof-Cieslak
Copy link
Member

TBF, not sure if we have any impact on this - we just call "send a text to terminal" API from VSCode

Maybe @Tyriar can help us with this?

@Krzysztof-Cieslak Krzysztof-Cieslak added the upstream - vscode issue Problems and suggestions that are related to or require changes in VSCode label Sep 7, 2020
@Tyriar
Copy link

Tyriar commented Sep 9, 2020

We made a change recently to fix a long standing issue where sent/pasted text would be truncated microsoft/vscode#38137. The fix was to split up the text into chunks of 50 characters which seems to match your gif.

I think now you're hitting a known Windows perf problem as a result of running conpty on the UI thread which is tracked in microsoft/vscode#74620

@isaacabraham
Copy link
Contributor

I saw this and tried moving back to the standard terminal renderer - for some reason I was on the DOM one which was super slow.

@SchlenkR
Copy link
Author

I guess it might really be a windows issue. When I send a bunch of text via the "Terminal: Run Selected Text in Active Terminal" to a Windows Powershell Terminal, it is also quite slow (like in the gif above).

Now when I run bash -c “vi filename.txt” and send the same text to it, it is really fast.

@isaacabraham
Copy link
Contributor

@ronaldschlenker which terminal renderer are you using?

@SchlenkR
Copy link
Author

I tried it with all 3 (canvas, dom and WebGL), but there is no significant difference. And I think the issue has definitely something to do with the used console host and maybe the communication with it, since using WSL/bash, it is really fast.

@Krzysztof-Cieslak
Copy link
Member

Ok, I'm closing this one here, as it's nothing we can control/fix anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream - vscode issue Problems and suggestions that are related to or require changes in VSCode
Projects
None yet
Development

No branches or pull requests

4 participants