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

Reverse scrolling with msys2 'less' extremely slow #1469

Closed
garyo opened this Issue Mar 6, 2018 · 4 comments

Comments

Projects
2 participants
@garyo

garyo commented Mar 6, 2018

Versions

ConEmu build: 180206 alpha x64
OS version: Windows 10 x64
Used shell version: msys2 zsh or bash

Problem description

Reverse scrolling with msys2 'less' (or other curses programs) is extremely slow, around 2 lines/sec.

Steps to reproduce

  • Start msys2 zsh or bash
  • less <long file, more than 2 screens>
  • type 'G' to go to end; this is fast.
  • type 'b' to go back one screen; this causes an ANSI reverse scroll sequence per line, which is VERY SLOW, around 2 lines per sec.
  • In the ConEmu menu, turn OFF "bufferheight"
  • Now type SPC and 'b' a few times; it's very fast. No noticeable delays.

I recorded a typescript.txt file, attached here. You can just 'cat' that, or 'type' it in a cmd.exe window in ConEmu, and see the behavior. So you don't need msys2 installed to repro it. Just do this:

  • Start ConEmu with cmd.exe
  • type typescript.txt
  • observe slow reverse scrolling
  • turn off "bufferheight"
  • type typescript.txt
  • observe very fast behavior

If you examine the typescript.txt file, you'll see the ANSI ESC [ H ESC M ESC [ m sequences, starting at line 193, which are slow.

Actual results

Reverse scroll is very slow

Expected results

Fast scroll, same as forward

Additional files

typescript.txt

@Maximus5 Maximus5 added the ansi label Mar 8, 2018

@Maximus5 Maximus5 added this to To Do in ANSI via automation Mar 8, 2018

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Mar 8, 2018

How do you run your shell? Do you use Connector?

@Maximus5 Maximus5 moved this from To Do to Ready for Testing in ANSI Mar 10, 2018

@garyo

This comment has been minimized.

garyo commented Mar 10, 2018

I just use the defaults. I'm not sure what Connector does or doesn't do. My {Shells::cmd} is cmd.exe /k "%ConEmuBaseDir%\CmdInit.cmd" for instance. And it's very slow to reverse-scroll there.

However, my msys2-64 zsh task is set to set CHERE_INVOKING=1 & set "PATH=%ConEmuDrive%\msys64\usr\bin;%PATH%" & %ConEmuBaseDirShort%\conemu-msys2-64.exe -new_console:p %ConEmuDrive%\msys64\usr\bin\zsh.exe --login -i -new_console:C:"%ConEmuDrive%\msys64\msys2.ico" which looks super complicated for just starting zsh; I'm not sure why it's that complicated. I don't think that's related to the problem, but thought I'd mention it.

@garyo

This comment has been minimized.

garyo commented Mar 10, 2018

Hey, nice -- 180309 fixes it for me. Thanks!

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Mar 11, 2018

When you run less from cmd - all problems should be addressed to cygwin/msys. They use WinAPI instead of ANSI and ConEmu is out of play.

Tasks were implemented to hide complicated command lines, so users may run them by names.

@Maximus5 Maximus5 closed this Mar 11, 2018

ANSI automation moved this from Ready for Testing to Done Mar 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment