Skip to content

When upgrading from PSReadLine 2.1 to 2.2, Pasting on remote machines gets slow towards end #3879

@wonkifier

Description

@wonkifier

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

N/A

Screenshot

SlowPaste220b5.mov

Environment data

PS Version: 7.3.9
PS HostName: ConsoleHost
PSReadLine Version: 2.2.0-beta5
PSReadLine EditMode: Emacs
OS: Linux <redacted> 3.10.0-1160.99.1.el7.x86_64 #1 SMP Thu Aug 10 10:46:21 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
BufferWidth: 176
BufferHeight: 62

I first observed this on PSReadLine 2.2.6 (as part of a default Powershell 7.3.9 install), but tested with current version, and then tested back to 2.2.0-beta5.
2.2.0-beta4 pasted normally (everything in one shot, no slowdown for latter portion of paste)

Something changed from beta4 to beta5 that causes this

Steps to reproduce

#- Create a text file/window with the following sample contents to copy from

&{

  Write-Host "Test line"
  Write-Host "Test line"
  Write-Host "Test line"
  Write-Host "Test line"
  Write-Host "Test line"
  • From my local Mac running Terminal.app, SSH into the RHEL 8 host in a bash shell
  • run pwsh
  • Copy the text from the file above and paste into the window
  • Observe that the first portion of the paste is instant, then the latter portion appears as if it's being type out by hand
  • Press Ctrl-C to get back to a regular prompt

Steps I used to change version of PSReadline:

  • While logged into remote bash session:
pwsh -noprofile -command "Uninstall-Module PSReadLine"
pwsh -noprofile -command "Install-Module PSReadLine -Force -SkipPublisherCheck -RequiredVersion 2.2.0-beta4 -AllowPrerelease"
pwsh
get-module psreadline # to confirm the installed version

Expected behavior

The entire contents of the past should be "instant", no slowdown at the end.

Actual behavior

Refer to attached video... The first portion of the paste is instant, then the latter portion appears as if it's being typed out by hand

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRA PR is opened targeting the issueIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Attention 👋

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions