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

Starting commands from Far Manger command line in ConEmu is very slow #1838

Open
MishaKharaba opened this Issue Feb 27, 2019 · 23 comments

Comments

8 participants
@MishaKharaba
Copy link

MishaKharaba commented Feb 27, 2019

ConEmu x64 190225, Far 3.0.5225 x64

I run FarManager in ConEmu window.
From Far command line I start command:
cd C:\ or cd D:\ or just dir - it does not matter

After pressing ENTER it takes 2-3 seconds to start command

When Far is running standalone without ConEmu the commands starts immediately.

Reinstalling ComEnu with default settings did help

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Feb 27, 2019

So, do you observe the problem now or not?

@bitraid

This comment has been minimized.

Copy link

bitraid commented Feb 27, 2019

I've experienced the same issue lately, but i haven't found the time yet to check which setting causes the dealy.

@bitraid

This comment has been minimized.

Copy link

bitraid commented Mar 2, 2019

For me the delay happens if far is started with the -w switch (outside ConEmu there is no delay).

@bitraid

This comment has been minimized.

Copy link

bitraid commented Mar 2, 2019

I also noticed that the delay is much less if the ConEmu far plugins are not installed.

@bitraid

This comment has been minimized.

Copy link

bitraid commented Mar 2, 2019

After testing on different machines i noticed that the delay is very small (barely noticeable) on a fast system but really shows on slower VMs.

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 2, 2019

Try to disable Long console output

@bitraid

This comment has been minimized.

Copy link

bitraid commented Mar 2, 2019

Yes that's much better, thanks.

@MishaKharaba

This comment has been minimized.

Copy link
Author

MishaKharaba commented Mar 12, 2019

So, do you observe the problem now or not?

I still have an issue on my work machine. But on virtual machine (win server 2016 ) it works well.

If there are some debugging options with adtitional logging, I can run it on my work machine and send you log file.

@industrious

This comment has been minimized.

Copy link

industrious commented Mar 13, 2019

I see the same problem on my work computer too. Disabling long console output does not help. No such a problem when Far is running standalone.
Far 3.0.5254 ConEmu 190310
Windows 10 (version 1809)

@industrious

This comment has been minimized.

Copy link

industrious commented Mar 13, 2019

I see the same problem on my work computer too. Disabling long console output does not help. No such a problem when Far is running standalone.
Far 3.0.5254 ConEmu 190310
Windows 10 (version 1809)

Ok, I guess it was related to long console output after all.

@lllcky

This comment has been minimized.

Copy link

lllcky commented Mar 24, 2019

There is the same issue for me. But on ConEmu x86 the delay of command execution is little shorter than on x64 version. Any solution?
ConEmu version 190310 preview

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 25, 2019

But on ConEmu x86 the delay of command execution is little shorter than on x64 version.

Unbelievable... The delay depends only on "long console output" and actual height of the buffer.
Note that expected delay depends after command execution. At that moment ConEmuC (bitness doesn't depend on ConEmu bitness) reads output of the command.
There is no other way to eliminate the delay except disable "long console output".

@target-san

This comment has been minimized.

Copy link

target-san commented Mar 26, 2019

Just my 5 cents. Delay happens only if FAR runs in ConEMU. If either FAR runs in CMD or ConEMU runs cmd, there's no delay. Delay happens both before and after command execution.

ConEmu 190324 x64
FAR 3.0b5354 x64
Win 10 1809 x64

@MishaKharaba

This comment has been minimized.

Copy link
Author

MishaKharaba commented Mar 26, 2019

Just now I have updated ConEmu to the last version and reset setting to default.
In my situation option "long console output" does not change anything.
Btw, delay is before command execution

@Maximus5 Maximus5 added this to To Do in Inspection via automation Mar 26, 2019

@Maximus5 Maximus5 added this to To Do in Far via automation Mar 26, 2019

@BOOtak

This comment has been minimized.

Copy link

BOOtak commented Mar 27, 2019

I can confirm that issue. I don't need to execute any command inside Far to experience the delay, even pressing Enter in Far causes it. Disabling long console output does not seem to help.

I noticed that during the delay, conhost.exe eats the whole CPU core (see image attached)

image

Also, if I launch Far in Cmder (which is based on ConEmu, I suppose), it works just fine and I don't experience any delays in Far.

Also, Far works just fine in ConEmu on Windows 7, and it did work fine on previous updates of Windows 10 (unfortunately, I don't recall the last Windows 10 build number where Far worked fine inside ConEmu)

Windows 10 x64 ver 10.0.17763.107
Far Manager, version 3.0 (build 4774) x64
ConEmu 190324 preview

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 27, 2019

if I launch Far in Cmder (which is based on ConEmu, I suppose), it works just fine and I don't experience any delays in Far.

That can't be. Cmder is ConEmu. So the problem is with your settings only!

I need Log Files from the fresh 190326 build.

Run ConEmu64.exe -basic -log -run {far} and do the repro.

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

Merge remote-tracking branch 'upstream/master'
* upstream/master:
  190326 release files
  190326 Chocolatey and Nuget
  Maximus5gh-1849: SystemMenu does not appear if ConEmu is maximized.
  Maximus5gh-1838: Log times in CmdOutputStore/CmdOutputRestore.
  Internal. CLogFunction to separate file
  Internal. Fix mem leak
  Internal. Fix var going out of scope
  Internal. Fix wrong window enumeration
  Internal. Fix some cl warnings
  Internal. SmallRect logging functions
@BOOtak

This comment has been minimized.

Copy link

BOOtak commented Mar 27, 2019

@Maximus5

So the problem is with your settings only!

OK, this sounds promising! I hope we figure out what these settings are.

Run ConEmu64.exe -basic -log -run {far} and do the repro.

Done:
ConEmuLogs.zip

@MishaKharaba

This comment has been minimized.

Copy link
Author

MishaKharaba commented Mar 27, 2019

My logs
ConEmuLogs.zip

I have run twice cd c:\ and cd d:\
Delay was exactly after pressing Enter and before starting command.
It looked like a smal freeze after Enter for 1-2 sec

@lllcky

This comment has been minimized.

Copy link

lllcky commented Mar 28, 2019

There is a demonstration of logs collections and the issue
(video) https://radikal.ru/video/gWmqZTzoyDJ

These logs: ConEmu-srv-5396.zip

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Mar 31, 2019

I've updated logging. Please install build 190331 and redo logs.

@Maximus5 Maximus5 added this to the 190401 milestone Mar 31, 2019

@BOOtak

This comment has been minimized.

Copy link

BOOtak commented Apr 1, 2019

DanaMW added a commit to DanaMW/ConEmu that referenced this issue Apr 2, 2019

Merge remote-tracking branch 'upstream/master'
* upstream/master:
  190331 release files
  190331 Chocolatey and Nuget
  Maximus5gh-1851: Restore contents after return from Alternative screen was broken.
  Internal. Add some notes to RefillConsoleAttributes
  Internal. Fix cl warning
  Maximus5gh-1870: Add switch `/t:<temp dir>` to Setupper.
  Internal. Ensure all vars are initialized
  Maximus5gh-1871: Add some logs to WindowPosChaning.
  Internal. Integer arithmetics
  Maximus5gh-1838: Log start/stop command from Far.exe.
  Maximus5gh-1878: Enable log in `ConEmuC /c` when started from Far.exe.
  Internal. Check for invalid arguments
  Internal. Let CLogFunction log begin/end times
  Internal. Prettify logs
  Internal. Define global ConEmuCD_DLL_3264 macro
  Maximus5gh-1877: Option 'Snap to desktop edges' was broken (regression 663a216).
@DamianFekete

This comment has been minimized.

Copy link

DamianFekete commented Apr 8, 2019

I've created the logs with -log5. I've changed directory (cd folder) at 11:26:30.
2019-04-08-conemu.zip

11:26:30.481 WM_KEYDOWN ""  wParam=x0000000D, lParam=x011C0001
11:26:30.481 WM_CHAR "\r" wParam=x0000000D, lParam=x011C0001
11:26:30.481   (\x000D) Down, count=1, VK=13, SC=28, CH=13, State=0x00000120 <Enhanced>
11:26:30.484 [14048] Invalidating from CRealConsole::MonitorThread.1
11:26:30.484 [13728] CConEmuChild::OnPaint
11:26:30.484 [13728] Blitting to Display
11:26:30.641 WM_KEYUP   ""  wParam=x0000000D, lParam=xC11C0001
11:26:30.641   (\x000D) Up,   count=1, VK=13, SC=28, CH=13, State=0x00000120 <Enhanced>
11:26:31.016 [14048] Invalidating from CRealConsole::MonitorThread.1
11:26:31.016 [13728] CConEmuChild::OnPaint
11:26:31.016 [13728] Blitting to Display

11:26:31.230 MainThread Far.exe: Start command execution? buffer={80x32766} rect={0,32741}-{79,32765}
11:26:31.977 MainThread Far.exe: Start command execution? buffer={80x32766} rect={0,32741}-{79,32765}
11:26:31.989 RefrThread CurSize={80,25,32766} Cursor={13,32764,15%V} ConRect={0,32741}-{79,32765} :ReadConsoleInfo (skipped=1) {1:1:x520:0} {(0,0) (273x164)} `Lucida Console` 5x3 [begin]
11:26:31.989 RefrThread CurSize={80,25,32766} Cursor={13,32764,15%V} ConRect={0,32741}-{79,32765} :ReadConsoleInfo (skipped=1) {1:1:x520:0} {(0 [end]
11:26:31.990 RefrThread ReadConsoleData: content was changed

11:26:31.992 [14048] ApplyConsoleInfo: ScreenBufferInfo changed
11:26:31.992 [14048] ApplyConsoleInfo: Console contents received
11:26:31.992 [14048] DataCmp was changed, width=80, height=25, count=2000, posY=0, posX=53
11:26:31.992 [14048] ApplyConsoleInfo: InitBuffers&LoadDataFromSrv -> changed
11:26:31.996 [14048] mp_VCon->Update from CRealConsole::MonitorThread
11:26:31.996 [14048] Invalidating from CVirtualConsole::Update.1
11:26:31.996 [13728] CConEmuChild::OnPaint
11:26:31.998 [13728] Blitting to Display
11:26:32.006 [14048] ApplyConsoleInfo: Console contents received
11:26:32.006 [14048] mp_VCon->Update from CRealConsole::MonitorThread
11:26:32.006 [14048] Invalidating from CVirtualConsole::Update.1
11:26:32.006 [13728] CConEmuChild::OnPaint
11:26:32.006 [13728] Blitting to Display

11:26:35.677 RefrThread ReadConsoleData: content was changed
11:26:35.982 RefrThread ReadConsoleData: content was changed
11:26:36.013 MainThread Far.exe: SetConsoleMode(x00000008, x000001B7)
11:26:36.016 RefrThread Mode ConInMode changed: old=x01B8 new=x01B7
@bitraid

This comment has been minimized.

Copy link

bitraid commented Apr 9, 2019

I've just tested the same ConEmu+Far setup on two virtual machines with identical hardware (and on the same host), one running Windows 10 v1607, and the other Windows 10 v1809. The one running v1809 was considerably slower.

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.