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

Annoying animation when pasting long string into PowerShell #3756

Closed
5 tasks done
kkshinkai opened this issue Jan 8, 2022 · 12 comments
Closed
5 tasks done

Annoying animation when pasting long string into PowerShell #3756

kkshinkai opened this issue Jan 8, 2022 · 12 comments

Comments

@kkshinkai
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

I've had this problem since I started using PowerShell. When I try to paste a long string (usually a path) into PowerShell, it always plays a typewriter animation and I have to wait until it's done.

vscode-pwsh-example

I am not confident that the problem is with this plugin, but PowerShell works fine after I disabling it, so I guess it's not a VSCode or terminal issue. The Terminal.app that comes with macOS is also fine.

Is there any way we could remove this animation? This is almost the only reason I don't use PowerShell.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Darwin 21.1.0 Darwin Kernel Ve…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
x64

Extension Version

Steps to Reproduce

Just open

Visuals

No response

Logs

No response

@kkshinkai kkshinkai added the Issue-Bug A bug to squash. label Jan 8, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jan 8, 2022
@SydneyhSmith
Copy link
Collaborator

Thanks so much for your issue @kkshinkai , it appears that this is actually a performance issue where the underlying calls to PSReadline delay the pasting in a way that makes it appear as an animation... I will mark this as a performance issue

@SydneyhSmith SydneyhSmith added Area-Extension Terminal Area-PSReadLine and removed Needs: Triage Maintainer attention needed! labels Jan 11, 2022
@SydneyhSmith
Copy link
Collaborator

It would also be great if you could try our preview extension as some of the performance improvements released there may solve this issue

@SydneyhSmith SydneyhSmith added the Needs: Author Feedback Please give us the requested feedback! label Jan 11, 2022
@josefwegner
Copy link

josefwegner commented Jan 19, 2022

Hi,

I have the same issue on my Raspberry Pi 400 running Debian Bullseye ARM64. I also tried the preview extension, but sadly, pasting stuff is still as slow as the release extension.

PowerShell Version

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Linux 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

VSCode Version

> code --version
1.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
arm64

Extension Version

ms-vscode.powershell-preview

@ghost ghost added Needs: Maintainer Attention Maintainer attention needed! and removed Needs: Author Feedback Please give us the requested feedback! labels Jan 19, 2022
@JustinGrote
Copy link
Collaborator

I don't have this issue when pasting on Windows, perhaps it is MacOS specific? I believe the vscode terminal implementations use different VTYs between MacOS and Windows. Does this happen in a regular terminal too e.g. bash?

Capture.mp4

@JustinGrote JustinGrote added Needs: Author Feedback Please give us the requested feedback! OS-macOS and removed Needs: Maintainer Attention Maintainer attention needed! labels Jan 24, 2022
@josefwegner
Copy link

It also happens on Linux (Debian 11). And no, using a regular terminal like bash or a raw powershell terminal (not the Powershell Integrated Console) works fine.

I tried my Windows machine, and you are correct, on Windows the Integrated Console is extremely fast and does not have the same issue.

@ghost ghost added Needs: Maintainer Attention Maintainer attention needed! and removed Needs: Author Feedback Please give us the requested feedback! labels Jan 24, 2022
@andyleejordan andyleejordan added OS-Linux and removed Needs: Maintainer Attention Maintainer attention needed! labels Jan 24, 2022
@andyleejordan andyleejordan moved this from Todo to In Progress in Sea Biscuit Apr 12, 2022
@andyleejordan andyleejordan moved this to Todo in Sea Biscuit Apr 12, 2022
@andyleejordan
Copy link
Member

Hi there, we just released v2022.4.0-preview! Could you please try PowerShell Preview for VS Code and verify this is fixed? It seemed to be in my testing, so marking as resolved, but please let me know if it's still occurs (or if new bugs show up)!

@andyleejordan andyleejordan added the Resolution-Fixed Will close automatically. label Apr 12, 2022
@andyleejordan
Copy link
Member

This was an ancient bug that was really annoying and I am super happy to see it fixed.

@ghost ghost closed this as completed Apr 13, 2022
@ghost
Copy link

ghost commented Apr 13, 2022

This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.

Repository owner moved this from In Progress to Done in Sea Biscuit Apr 13, 2022
@josefwegner
Copy link

Thank you, it is much, much better.
But on my Raspberry Pi 400 (Debian Bullseye AMD64), the last 5 or 6 chars are still appearing with a delay. This is regardless how long the pasted string is. The first n-6 chars appear instantaneously, the last 6 chars char by char. I will try to make a screen capture later today.

@josefwegner
Copy link

Sorry for the shakiness. But I could not capture the slowness using a screen recorder. I hope you can still see my issue:
https://www.youtube.com/watch?v=8gTtWyA0iqE

@andyleejordan
Copy link
Member

Woah, that's so interesting. At this point, we are quite literally only calling .NET's Console.ReadKey() API. I'm curious, does this "last 6 character" issue occur in a regular pwsh console (in and/or out of VS Code, and definitely with PSReadLine)?

@josefwegner
Copy link

No, it does not happen in a regular pwsh console inside and outside of VS Code. PSReadLine is definitely activated:
$PROFILE:

...
Set-PSReadLineOption -EditMode Vi
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
...

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants