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

BufferHeight causes a delay when opening/closing apps that use alternate screen (eg vim, nano, etc) #1385

Closed
telamonian opened this Issue Jan 3, 2018 · 23 comments

Comments

Projects
@telamonian
Copy link

telamonian commented Jan 3, 2018

Versions

ConEmu build: 171226 x32/x64 (tried with both)
OS version: Windows 10 x64
Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): bash (WSL)

Problem description

Whenever I open or close a file using vim there's a delay of several seconds. Other apps that use the alternate screen mechanism (such as nano) seem to have the same problem as well. Turning off the BufferHeight option by pressing the related button on the tab bar fixes the issue, but then I lose all scrollback.

Steps to reproduce

  1. Install WSL, Ubuntu (from the MS store), and ConEmu.
  2. Open any file using the vim or nano commands that ship with the Ubuntu instance from the MS store.

Some notes/observations

  • When I close a file in vim, there's first a slight delay, then the terminal screen loses all color and goes black and white, and then there's a longer delay before vim finally quits. Not sure if that's a helpful detail for tracking down the issue, but it is pretty weird.

  • The Real console (from the debug menu) has slightly different behavior from the actual ConEmu console. When opening a file with vim, both the Real and the ConEmu consoles hang for a couple of seconds. However, when I close vim it closes instantly in the Real console, whereas the ConEmu console hangs again for a couple of seconds.

@telamonian

This comment has been minimized.

Copy link
Author

telamonian commented Jan 3, 2018

Just tried upgrading to the latest vim, but it didn't help. Figured it was worth a shot

@Maximus5 Maximus5 added this to To Do in ConEmu via automation Jan 3, 2018

@Maximus5 Maximus5 added the ansi label Jan 3, 2018

@toddjames

This comment has been minimized.

Copy link

toddjames commented Apr 24, 2018

Same problem here. Is there any workaround for launching nano in a way that doesn't lag the console? This is the last thing preventing me from switching from Cygwin to WSL.

@dypsilon

This comment has been minimized.

Copy link

dypsilon commented Jun 10, 2018

Same issue here. Running less ~/.bash_history produces a 1-2 seconds delay on open and on close. No delay in basic bash.exe running without ConEmu.

@jared-is-ray

This comment has been minimized.

Copy link

jared-is-ray commented Jun 18, 2018

I also notice this same behavior when running vim/less over ssh. I see a long pause when opening these programs. If I disable the BufferHeight I no longer see the pause.

ConEmu version: 180617 (with flags -cur_console:p)
SSH for Windows Version: 7.6.1.0p1-Beta
Windows Version: 10 - 1803 Build 17692.1000

@gc435

This comment has been minimized.

Copy link

gc435 commented Jul 8, 2018

I can confirm the same delay happens for me, and there is no delay when bufferheight is turned off.

ConEmu 180626
Vim 8.0.604

@anvarich

This comment has been minimized.

Copy link

anvarich commented Jul 26, 2018

Can confirm it too.
WinVer 1803 Build 17713.1002
ConEmu 180626
Vim 8.0.604
mc
less

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Jul 26, 2018

Work on new pty interface is in progress

@agnf

This comment has been minimized.

Copy link

agnf commented Nov 16, 2018

I can confirm the same delay happens for me, and there is no delay when bufferheight is turned off.

ConEmu 180626

@Rohaq

This comment has been minimized.

Copy link

Rohaq commented Nov 17, 2018

Getting the same issue inside cygwin too. Opening and closing things like emacs has an extremely noticeable delay of 1-2 seconds with Bufferheight enabled.

ConEmu 180626 preview

@unhuman

This comment has been minimized.

Copy link

unhuman commented Dec 24, 2018

Disabling (unchecking) bufferheight doesn't work for me, but changing the value to something smaller does...

I've found that using smaller values (say 3000) seems to be a decent compromise until there's a fix.

@zxbuaa

This comment has been minimized.

Copy link

zxbuaa commented Jan 5, 2019

Same issue to me.
ConEmu 180626

1 similar comment
@zhlonggang

This comment has been minimized.

Copy link

zhlonggang commented Jan 5, 2019

Same issue to me.
ConEmu 180626

@Brassfield

This comment has been minimized.

Copy link

Brassfield commented Jan 20, 2019

Problem Continues - ConEmu64 190108

The delay between Debug's RealConsole and default ConEmu (60k lines of buffer?) was about 3 seconds, or 50% when shutting down aptitude.

Cutting /Gen/Size&Pos/Size/Console Buffer Height to 5K significantly decreases the delay.

@bsdelf

This comment has been minimized.

Copy link

bsdelf commented Mar 8, 2019

Exactly the same issue (observation 1).

  • version: 190303
  • task: conemu-cyg-64.exe --wsl -t zsh
@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 8, 2019

gh-1841

@toddjames

This comment has been minimized.

Copy link

toddjames commented Mar 9, 2019

For anyone else simply looking for a Linux shell experience on Windows with WSL and was hoping to use ConEmu + WSL, I found an alternative solution that works well for me. I had given up on ConEmu due to this issue (sorry, @Maximus5 , but I do thank you for all of your work on this project.. I used it for a few years).

You may want to check out X410 in the Microsoft Store. It's usually $10 (and almost always "on sale"). You can use a native Linux terminal like Tilix or GNOME terminal with WSL. Just make sure to follow their tutorials on their website for setup (including running sudo commands as yourself, not as root). I'm not affiliated or anything - just another person looking for a Linux shell experience on Windows with WSL.

Maximus5 added a commit that referenced this issue Mar 10, 2019

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 10, 2019

@bsdelf

This comment has been minimized.

Copy link

bsdelf commented Mar 11, 2019

190310?

The issue is gone. Thanks for your work.

@bsdelf

This comment has been minimized.

Copy link

bsdelf commented Mar 11, 2019

With 190310, actions like close vim, ctrl-z, fg is fluent now.

While in tig, pressing j to scroll down still has noticeable renderer latency (compared with vscode's wsl console). However, it might be another issue.

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 11, 2019

tig problem is not related to this issue. Please fill new one

@Maximus5 Maximus5 closed this Mar 11, 2019

ConEmu automation moved this from To Do to Done Mar 11, 2019

@dzek69

This comment has been minimized.

Copy link

dzek69 commented Mar 11, 2019

Any progress update or some ETA on this one?

Thanks for your work so far.

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 11, 2019

@dzek69 What are you asking about? The issue is closed, ETA is zero.

@dzek69

This comment has been minimized.

Copy link

dzek69 commented Mar 11, 2019

Oh, sorry, it was closed just few hours ago and I missed that. Just upgraded and looks like it isn't slow anymore. Thanks.

DanaMW added a commit to DanaMW/ConEmu that referenced this issue Mar 11, 2019

Merge remote-tracking branch 'upstream/master'
* upstream/master: (22 commits)
  190310 release files
  Internal. Release and deply scripts
  190310 Chocolatey and Nuget
  Internal. Release and deploy scripts
  ANSI: Visual Bell for `ESC g`.
  Maximus5gh-1733: Enable dark theme scrollbars with `ConEmu.exe -Theme DarkMode_Explorer`.
  Log duration of external hooks checks.
  Internal. MPerfCounter improvements
  Maximus5gh-463: ConEmu.exe switch `-NoHooksWarn` disabled external hooks checks.
  Internal. Ignore PVS-Studio generated files
  Internal. Log ms for RefillConsoleAttributes
  Connector: When `--log` is used, log current system time each 500ms.
  Maximus5gh-1323, Maximus5gh-1385, Maximus5gh-1841: Let ‘Alternative mode’ toolbar button works with console buffers.
  Internal. Log timeouted LoadAlternativeConsole
  Internal. Fix pvs warnings
  Maximus5gh-1323, Maximus5gh-1385, Maximus5gh-1841: Speed up alternative buffer operations (connector).
  Internal. Fix some cl warnings (type cast)
  Internal. IsWin7Eql
  Internal. Remove unused/commented code
  Internal. Preparation for strikethrough
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.