rheostat2718 / conemu-maximus5

Automatically exported from code.google.com/p/conemu-maximus5
7 stars 1 forks source link

Slow input response on startup with more than one open tab #1590

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
OS version: Win7 x64
ConEmu version: 140523

When I start Conemu with at least two startup tabs (both git bash, i.e. 
C:\Program Files (x86)\Git\bin\sh.exe), in all but the last tab, all input 
response is noticably delayed, i.e. I type and it is only displayed after a 
second or so. The output is also a little delayed. The problem goes away after 
I restart the tab. It only happnes when more than tab opens at startup. 

Example task commands:

""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"  
-cur_console:d:C:\Users\user.folder\folder"-cur_console:t:title"

""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"  
-cur_console:d:C:\Users\user.folder\folder"-cur_console:t:title"

Please let me know if I can provide more information. Thanks!

Original issue reported on code.google.com by mjsta...@gmail.com on 26 May 2014 at 8:42

GoogleCodeExporter commented 9 years ago
Attach yours ConEmuXml

Original comment by ConEmu.Maximus5 on 26 May 2014 at 8:53

GoogleCodeExporter commented 9 years ago
I removed all but a single task that causes the problem. I hope that didn't 
mess things up.

Original comment by mjsta...@gmail.com on 27 May 2014 at 7:38

Attachments:

GoogleCodeExporter commented 9 years ago
1. I see no problems with both tabs. So, you need to explain step-by-step what 
are you doing exactly.

2. Your task has too many quotation and space issues, fix them.
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i  
-cur_console:d:"C:\Users\user.folder\folder" -cur_console:t:title

Original comment by ConEmu.Maximus5 on 27 May 2014 at 7:49

GoogleCodeExporter commented 9 years ago
I can confirm the bug with 140528.
I have set option "remember opened tabs".
Now when I start conemu it opens 7 tabs:
1. cmd.exe - slow input
2. powershell - (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe) 
slow input
3. powershell - (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe) 
normal
4. ipython.exe - (C:\Python27\Scripts\ipython.exe) slow input
5. putty - (c:\tools\putty.exe -new_console -load something) normal
6. cygwin (sh.exe) - (c:\cygwin\bin\sh.exe -l -i) slow input
7. Git Bash (mingw) - ("C:\Program Files (x86)\Git\bin\sh.exe" --login -i) 
normal

I can't see a pattern with that.

Original comment by r.gom1...@gmail.com on 10 Jun 2014 at 7:17

GoogleCodeExporter commented 9 years ago
Please, export and attach your ConEmuXml

Original comment by ConEmu.Maximus5 on 10 Jun 2014 at 7:21

GoogleCodeExporter commented 9 years ago
I didn't have conemu.xml, so I created one by clicking export on conemu 
settings.

Hope it's fine with you.

Original comment by r.gom1...@gmail.com on 10 Jun 2014 at 7:37

Attachments:

GoogleCodeExporter commented 9 years ago
The following data is not exported to xml (tabs):

*C:\Windows\System32\cmd.exe -cur_console:a

*C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -cur_console:a

*C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -cur_console:ab

>*C:\Python27\Scripts\ipython.exe -cur_console:ab

*c:\tools\putty.exe -load SvnConnection -cur_console:ab

*c:\cygwin\bin\sh.exe -l -i -cur_console:ab

*"C:\Program Files (x86)\Git\bin\sh.exe" --login -i -cur_console:ab

Original comment by r.gom1...@gmail.com on 10 Jun 2014 at 10:55

GoogleCodeExporter commented 9 years ago
You have UAC confirmation disabled?

Original comment by ConEmu.Maximus5 on 10 Jun 2014 at 11:12

GoogleCodeExporter commented 9 years ago
It seems so (confirmed with User Account Control Settings, I'm not sure about 
group policy or other means).

Original comment by r.gom1...@gmail.com on 10 Jun 2014 at 1:16

GoogleCodeExporter commented 9 years ago
Confirm bug with 140908 (x32).

I've got this issue not only at startup. Here is mine demo:
 - put hotkey for ctrl-f2 for simple cmd.exe tab.
 - fast click ctrl-f2 several times (two is quite enough for demonstration)
 - all new tabs except last are very slow for input (second or two for each symbol to became visible). All other actions are very slow too (for example, delete with backspace).

Tried to disable "Inject ConEmuHk" - no difference.

System: Windows 7 Pro x32.

ConEmu.xml attached.

UAC confirmation enabled.

Original comment by seik0ix...@gmail.com on 9 Sep 2014 at 11:12

Attachments:

GoogleCodeExporter commented 9 years ago
OldBuild

Original comment by ConEmu.Maximus5 on 9 Sep 2014 at 11:33

GoogleCodeExporter commented 9 years ago
You don't believe my words, but believe only in ConEmu.xml. Pity.

Try experiment:
1. Download old release, maybe some I had - 140310 (or alike)
2. Change some settings to create ConEmu.xml
3. Download latest version 140908
4. Change some settings to update ConEmu.xml
5. Check which build it shows.

p.s. Ok, I'm not that angry, I understand. Here is manual (so, not inherited) 
export of ConEmu.xml from exactly the same version of ConEmu.
p.s.s. With ConEmu.xml replaced with manual export bug is also present.

Original comment by seik0ix...@gmail.com on 9 Sep 2014 at 6:04

Attachments:

GoogleCodeExporter commented 9 years ago
I tried your attached ConEmu.xml. The problem was not reproduced.
So, what can I think?

Well, I will try the latest attachment but I think I need confirmation of repro 
steps...
Also, please try again with "-log" switch and attach LogFiles.

Original comment by ConEmu.Maximus5 on 9 Sep 2014 at 6:24

GoogleCodeExporter commented 9 years ago
Tried last ConEmu on another system. Here ConEmu was not installed previously.

Bug was easily repeated. Everything as I described before. In attach ConEmu.xml 
and -log switch results.

What I have noticed: previous system (call it Work one) is much slower, than 
current (call it Home one). On Work system even opening tab in ConEmu with 
cmd.exe shell is not very fast (3 seconds, at average).
Home System is a bit faster. First time I tried to reproduce issue and failed, 
and I noticed that tabs was opened quite fast, just faster, than I pressed to 
open another tab.
But I can work hard and open tabs fast - issue was reproduced.
Then, with -log switch, ConEmu works very slow and reproduce issue is very 
simple.

So, in other words, maybe you should try to reproduce issue in some slow 
windows? Maybe some restricted virtual machine?

Original comment by seik0ix...@gmail.com on 9 Sep 2014 at 8:23

Attachments:

GoogleCodeExporter commented 9 years ago
New Data to think over.

First, now I can't say, that with -log switch we got usefull info. With -log 
switch cmd.exe in ConEmu is ALWAYS reacts slow on any action. So previous 
results can not be accounted.

Second, to reproduce issue without -log switch I put cmd.exe on F2, then press 
and HOLD that button to see tabs flood everywhere. And only SOME of the tabs 
are slow. In average 1 of 6.
So now I believe more in that issue may be reproduced on a slower systems.

Original comment by seik0ix...@gmail.com on 9 Sep 2014 at 8:37

GoogleCodeExporter commented 9 years ago
How exactly are you switching tabs? Mouse click on tab?

Does the speed remain slow if you wait on the slow tab a few seconds?

Original comment by ConEmu.Maximus5 on 9 Sep 2014 at 8:41

GoogleCodeExporter commented 9 years ago
The problem is real. My start-up task opens five tabs, all with powershell. The 
middle one is admin. Often the first tab has the very slow input response. 
Sometimes the second tab too. The third (admin), fourth and fifth tab are 
always good. Opening a new tab to replace the slow one, is always successful 
(i.e. the new tab always has normal input response).

The problem is that this behaviour is not consistent. So, it might be very hard 
to find the cause. Furthermore, it's only a slight inconvenience to me, as I 
restart ConEmu only twice a month, on average.

Incidentally, today everything went well after installing and starting new 
release 140908[64]. I was thinking, it might help to wait one or two minutes 
before entering the admin password; but that is merely a guess.

Original comment by mb97...@gmail.com on 9 Sep 2014 at 8:44

GoogleCodeExporter commented 9 years ago
>How exactly are you switching tabs? Mouse click on tab?
Sometimes with mouse, sometimes Ctrl-Tab (Ctrl-Shift-Tab). But that question 
looks strange. Issue reproduced both ways.

>Does the speed remain slow if you wait on the slow tab a few seconds?
Waiting does not help - speed remains the same and slow.

Original comment by seik0ix...@gmail.com on 9 Sep 2014 at 8:58

GoogleCodeExporter commented 9 years ago
Update to 140909. Nothing was changed?

OK, I will try to repeat.

If you can create MemoryDump's and upload them (zipped) to DropBox or some 
other hosting, that may be helpful.

I need dumps at the moment you've noticed that input is slow and it is not 
fixed in a few seconds.
The dumps of processes: ConEmu.exe (the GUI) and ConEmuC[64].exe (the server 
process of your current slow console).

Original comment by ConEmu.Maximus5 on 10 Sep 2014 at 7:42

GoogleCodeExporter commented 9 years ago
New data to think over:

1. Here is dumps: https://yadi.sk/d/zYfGGJ7XbN4Sf
Made with Windows Task Manager. As I said before, last tab is normal and all 
others are slow, here we have two tabs - last one and another one which is slow.

2. Another notice: when I have only two tabs - slow one and one which is last 
(and normal). Then, when I close this last tab then previous, which is slow, 
become normal.

Original comment by seik0ix...@gmail.com on 10 Sep 2014 at 11:55

GoogleCodeExporter commented 9 years ago
BTW, dumps maid from 140909, so the issue remains in this build.

Original comment by seik0ix...@gmail.com on 10 Sep 2014 at 11:56

GoogleCodeExporter commented 9 years ago
BTW[2], I use 32-bit windows and ConEmu.exe is also 32-bit

Original comment by seik0ix...@gmail.com on 10 Sep 2014 at 11:58

GoogleCodeExporter commented 9 years ago
Turn "On" checkbox "Sleep in background"

Original comment by ConEmu.Maximus5 on 10 Sep 2014 at 1:33

GoogleCodeExporter commented 9 years ago
With "Sleep in background" issue happens not each time I try (as I said 
yesterday, on slow Work system), but anyway after few tries can be repeated.

Original comment by seik0ix...@gmail.com on 10 Sep 2014 at 1:45

GoogleCodeExporter commented 9 years ago
After experimenting a little, the slow input shows up more consistently.

Start-up task is,
*powershell -new_console:t:"PoSh":d:"C:\Users"

powershell -new_console:t:"PoSh":d:"D:\bt"

powershell -new_console:t:"PoSh":d:"C:\Users\Eric\AppData\Roaming\ConEmu"

powershell -new_console:t:"PoSh":d:"C:\Users\Eric\AppData\Roaming\Azureus\ipf"

>powershell -new_console:t:"PoSh":d:"C:\Users\Eric\Documents\Source\ConEmu"

powershell 
-new_console:t:"PoSh":d:"C:\Users\Eric\Documents\Source\SubtitleEdit\src\Languag
es" -noexit -command "pushd ..\..; p1"

powershell 
-new_console:t:"PoSh":d:"C:\Users\Eric\Documents\Source\SubTitleEdit\src\Languag
es" -noexit -command "pushd ..\..; p1"

The first tab (admin) is always OK. The last tab is always OK. The second, 
third and fourth tab are always slow. The fifth (active) and sixth tab vary: 
sometimes one of them is slow, sometimes both are good.

This also happens when {Start} (the start-up task) is invoked when ConEmu is 
already running.

In case it might help, I uploaded a full memory dump (CE140909-001.7z) at
 https://www.dropbox.com/sh/sttosk5gtror8f3/AAC7ePmHYKAwE3CnqSAmXcS4a?dl=0

If not too complicated, could you perhaps compile a ConEmu test version with a 
considerable (say 5 to 15 seconds) delay between opening new tabs? Just as a 
test?

Original comment by mb97...@gmail.com on 10 Sep 2014 at 7:39

GoogleCodeExporter commented 9 years ago
Try this: https://www.dropbox.com/s/jzfl8t6uo0cqxtj/ConEmu.140909a.bin.7z?dl=0

Original comment by ConEmu.Maximus5 on 10 Sep 2014 at 7:52

GoogleCodeExporter commented 9 years ago
Bull's eye! Thank you very much, Maxim.

I changed the first task from admin (*) to active (>), and removed '>' from 
task 5, then tested 15 times. The results were very consistent. Although the 
seven tabs open instantaneously, the delay before powershell starts makes all 
the difference. In all 15 tests, in all 7 tabs the input response was normal. 
No more slow tabs.

Of course, I also tested a few times with the original {Start} task from above, 
and again all tabs reacted normal to keyboard input.

Obviously, this cannot be the final solution (although I wouldn't mind the 
delay), but I hope it might be a step in the right direction.

Original comment by mb97...@gmail.com on 10 Sep 2014 at 9:58

GoogleCodeExporter commented 9 years ago
Am I understand correctly that with patch from #26 there is no more "slow tabs"?

If so, take ConEmuCD.dll from the patch and rollback ConEmu.exe to the official 
140909. What will happen?

Original comment by ConEmu.Maximus5 on 11 Sep 2014 at 7:35

GoogleCodeExporter commented 9 years ago
After a bit more experimenting,

the start-up task is:
powershell -new_console:t:PoSh -noexit -file %APPDATA%\ConEmu\StartUp.ps1

StartUp.ps1 contains:
set-location "${env:APPDATA}\Azureus\ipf"
powershell -new_console:t:PoSh -noexit -command "cls; lsa"
set-location "${env:APPDATA}\ConEmu"
powershell -new_console:t:PoSh -noexit -command "cls; lsa"
set-location "${env:USERPROFILE}\Documents\Source\ConEmu"
powershell -new_console:t:PoSh -noexit -command "cls; lsa"
set-location "${env:USERPROFILE}\Documents\Source\DataGridView"
powershell -new_console:t:PoSh -noexit -command "cls; lsa"
set-location "C:\Users"
powershell -new_console:a:t:PoSh -noexit -command "cls; lsa"
set-location "${env:USERPROFILE}\Documents\Source\SubTitleEdit\src\Languages"
powershell -new_console:t:PoSh -noexit -command "pushd ..\..; cls; lsa"
set-location "${env:USERPROFILE}\Documents\Source\SubTitleEdit\src\Languages"
powershell -new_console:t:PoSh -noexit -command "pushd ..\..; cls; lsa; git ba"
set-location "D:\bt"
cls; lsa

There is some delay (~2 seconds) after the first powershell tab (from {Start}) 
is opened, because powershell needs to load assemblies, and dot-source the four 
profiles. After that the seven additional powershell tabs open in 2-3 seconds. 
None of them has slow input response.

Apparently, 300-500 milliseconds delay between tabs might be enough to prevent 
the issue.

Original comment by mb97...@gmail.com on 11 Sep 2014 at 7:47

GoogleCodeExporter commented 9 years ago
With patch from #26 tabs are no more slow, it's OK.
Multiple tabs at once opened for some time, it's not so ok =), but better, 
because gives normal possibility to automate needed tabs at start.

Using only ConEmuCD.dll from patch is not enough - must replace ConEmu.exe to 
replace slow working tabs to slow opening tabs =).

Original comment by seik0ix...@gmail.com on 11 Sep 2014 at 8:14

GoogleCodeExporter commented 9 years ago
>> Am I understand correctly that with patch from #26
>> there is no more "slow tabs"?

Yes.

>> If so, take ConEmuCD.dll from the patch and rollback
>> ConEmu.exe to the official 140909. What will happen?

With 9 powershell tabs opened by the start-up task (see below), every time 
there will be 2 or 3 "slow tabs". Which tabs are slow and which are normal 
varies. Only the 1st, 7th (admin), 8th and 9th tab are always normal.

Tested 9 times, with start-up task:
>powershell -new_console:t:"PoSh":d:"D:\bt" -noexit -command "cls; lsa"

powershell -new_console:t:"PoSh":d:"%APPDATA%\Azureus\ipf" -noexit -command 
"cls; lsa"

powershell -new_console:t:"PoSh":d:"%APPDATA%\ConEmu" -noexit -command "cls; 
lsa"

powershell -new_console:t:"PoSh":d:"%USERPROFILE%\Documents\Source\ConEmu" 
-noexit -command "cls; lsa"

powershell 
-new_console:t:"PoSh":d:"%USERPROFILE%\Documents\Source\DataGridView" -noexit 
-command "cls; lsa"

powershell -new_console:t:"PoSh":d:"%USERPROFILE%\Documents\Source\ConEmu" 
-noexit -command "cls; lsa"

*powershell -new_console:t:"PoSh":d:"%SystemDrive%\Users" -noexit -command 
"cls; lsa"

powershell 
-new_console:t:"PoSh":d:"%USERPROFILE%\Documents\Source\SubTitleEdit\src\Languag
es" -noexit -command "pushd ..\..; cls; lsa"

powershell 
-new_console:t:"PoSh":d:"%USERPROFILE%\Documents\Source\SubTitleEdit\src\Languag
es" -noexit -command "pushd ..\..; cls; lsa; git ba"

Original comment by mb97...@gmail.com on 11 Sep 2014 at 8:28

GoogleCodeExporter commented 9 years ago
My current opinion is that "slowness" is actually the lags in the 
reading/drawing console cycle. But to in the input processing.
please confirm tthat 
a) press CtrlWinAltSpace to show RealConsole of slow tab
b) open Settings -> Info page 
c) go back to ConEmu tab and type something.
Supposing real console will react immediately but ConEmu tab will be laggy. 
Also I wonder what will be in the Info page (fps etc.)

Original comment by ConEmu.Maximus5 on 11 Sep 2014 at 8:38

GoogleCodeExporter commented 9 years ago
And one more check from ConEmuEnvironment if you have "Num" indicator on the 
keyboard (or Num in the status bar)

add to the beginning of each line in your task

Set ConEmuSleepIndicator=NUM & powershell ...

Supposing NUM will be turned off on slow tabs and ON on normal tabs.

Original comment by ConEmu.Maximus5 on 11 Sep 2014 at 9:15

GoogleCodeExporter commented 9 years ago
Looks interesting.

All as you said: RealConsole reacts normal, but ConEmu tab reacts slow.
Adn Performance Counters differ dramaticaly:
 When slow tab focused (no matter typing or not): FPS:0.2   Data:0.2   Render:0.7   Blt:4.5   RPS:2.4
 When normal tab focused it's hard to copy (btw, maybe make copy on click for that counters? maybe a tick to enable copy on click), but numbers are higher: FPS:8.1 Data:0.8 Render:6.5 Blt:14.9 RPS:90
 And on normal tab when typing numbers a bit higher (also, not very exact): FPS:15 Data:0.9 Render:6.7 Blt:14.9 RPS:90

Original comment by seik0ix...@gmail.com on 11 Sep 2014 at 9:43

GoogleCodeExporter commented 9 years ago
>Supposing NUM will be turned off on slow tabs and ON on normal tabs.

It's always ON for both slow and normal tabs. But... When I start typing on 
slow tab it starts blinking very frequently (very-very frequently).
But blinking presents only if "Sleep in background" is turned on. Otherwise NUM 
is just all the time on. To check if options work tried turn off the NUM with 
keyboard and it turns on back.

Original comment by seik0ix...@gmail.com on 11 Sep 2014 at 9:53

GoogleCodeExporter commented 9 years ago
Similar result as #34. Normal RealCConsole, slow ConEmu tab.

Counters:
Idle state: FPS:3.3 RPS:105.2
Typing in slow tab: FPS:1.9-2,3 RPS:<3.0
Typing in good tab: FPS:>10.0 RPS:104-106
Not much change in Data (0.1-0.3), Render (0.0-0.4), Blt (1.7-1.9).

The NUM in the status line is blinking rapidly in all tabs (slow and normal), 
all the time (in idle state as well as during typing).

Original comment by mb97...@gmail.com on 11 Sep 2014 at 10:27

GoogleCodeExporter commented 9 years ago
Release fix please. 
>> https://www.dropbox.com/s/jzfl8t6uo0cqxtj/ConEmu.140909a.bin.7z?dl=0
After windows reboot this stopped working

Original comment by nortrom....@gmail.com on 15 Sep 2014 at 2:16

GoogleCodeExporter commented 9 years ago
>>After windows reboot this stopped working
Sorry, wrong call. It was x64 version (autorun)

Original comment by nortrom....@gmail.com on 16 Sep 2014 at 9:13

GoogleCodeExporter commented 9 years ago
BTW, if you have not noticed yet,
https://code.google.com/p/conemu-maximus5/wiki/Whats_New#Build_141001
as workaround you may turn on "StartCreateDelay" to larger value

Original comment by ConEmu.Maximus5 on 6 Oct 2014 at 7:36

GoogleCodeExporter commented 9 years ago
Same issue here with build#141123, verified similar behavior in the disparity 
between the real and ConEmu console windows response times.

Is the official fix/workaround to use the StartCreateDelay setting?  Am I 
supposed to be setting it to a larger or smaller number?

Original comment by josh.mar...@epicgames.com on 25 Nov 2014 at 4:28

GoogleCodeExporter commented 9 years ago
Set it larger and larger until it helps

Original comment by seik0ix...@gmail.com on 25 Nov 2014 at 7:09

GoogleCodeExporter commented 9 years ago
141126

Original comment by ConEmu.Maximus5 on 26 Nov 2014 at 8:59

GoogleCodeExporter commented 9 years ago
Thanks for tackling this, I had been hobbling with the slow response time for a 
while, I finally looked and found this and now its resolved.

Original comment by josh.mar...@epicgames.com on 26 Nov 2014 at 11:13

GoogleCodeExporter commented 9 years ago
Sorry, but doesn't seem to be fixed here (141126).
What should I look for to debug that?

Original comment by r.gom1...@gmail.com on 27 Nov 2014 at 7:24

GoogleCodeExporter commented 9 years ago
Add "set ConEmuSleepIndicator=TITLE & " before each tab of a task.
Ensure tab template has "%s".
Show screenshot at least.

Original comment by ConEmu.Maximus5 on 27 Nov 2014 at 7:29

GoogleCodeExporter commented 9 years ago
I'm sorry, but could you repeat what to change and where?

Current tabs list:
*C:\Windows\System32\cmd.exe -cur_console:a -cur_console:d:c:\temp

*C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -cur_console:ab
-cur_console:d:C:\git

*cmd.exe -cur_console:ab -cur_console:d:C:\Users\rgomulk

*C:\Python27\Scripts\ipython.exe notebook --no-browser -cur_console:ab
-cur_console:d:C:\Users\rgomulk

-cur_console:d:C:\Users\rgomulk

Original comment by r.gom1...@gmail.com on 27 Nov 2014 at 12:49

GoogleCodeExporter commented 9 years ago
*set ConEmuSleepIndicator=TITLE &  C:\Windows\System32\cmd.exe -cur_console:a 
-cur_console:d:c:\temp

*set ConEmuSleepIndicator=TITLE & 
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -cur_console:ab
-cur_console:d:C:\git

And so on

Original comment by ConEmu.Maximus5 on 27 Nov 2014 at 2:25

GoogleCodeExporter commented 9 years ago
At first I've thought it helped, but second run showed the behaviour as
previously.

Could you elaborate further? I've assumed upgrading version would be
enough. Is prepending the sleep indicator required?

Is my setup that different? (I had auto save/restore enabled, I've changed
configuration to load tasks from file)

Are the differences caused by the change:
- conemu seems to start a bit slower
- tab titles are changing +/- [Sleep] (which I find a bit distracting)

Original comment by r.gom1...@gmail.com on 27 Nov 2014 at 2:43

GoogleCodeExporter commented 9 years ago
At least I need screenshots and LogFiles.

Original comment by ConEmu.Maximus5 on 27 Nov 2014 at 2:48

GoogleCodeExporter commented 9 years ago
Will provide that later today.
Which part of GUI would you like to see? Where should I upload all the
files?

Robert

Original comment by r.gom1...@gmail.com on 27 Nov 2014 at 3:01