Maximus5 / conemu-old-issues

Old issues imported from googlecode. Project was moved to
https://conemu.github.io
6 stars 1 forks source link

ConEmu starts in 6-7 seconds if Maximized window option is on #754

Open Maximus5 opened 9 years ago

Maximus5 commented 9 years ago

Originally reported on Google Code with ID 754

OS version: Win7   SP1   x86
ConEmu version: 121004 x86

If You start ConEmu in Maximized window "on" in Settings, it takes 6-7 seconds to start
(regardless of show/hide Titlebar option). During this delay "Waiting for console server..."
displayed.

If I start ConEmu NO maximezed but in a close as large window as a maximized one, start
done in 1-1.5 seconds (above message displayed c.a. 0.1 second). After started, a Maximize
command done in no time.

*Steps to reproduction*

Compare startup time with/without Maximized window size

Reported by nanofoxxx on 2012-10-07 13:56:47

Maximus5 commented 9 years ago
Startup time with /logN option is 3 seconds - _regardless_ of Normal/Maximized startup
size.

Reported by nanofoxxx on 2012-10-09 12:16:44

Maximus5 commented 9 years ago
Did you mean, latest version reproduces long startup without "/log"?

Reported by ConEmu.Maximus5 on 2012-10-09 17:29:05

Maximus5 commented 9 years ago
Yes, version 121008 x86 still works as follows:

- If I don't start maximized, it starts in 1 second (this is my preferred speed :)
- With /log it starts in 3 seconds regardless of Normal/Maximized start
- If I start maximized without /Log then it takes 6-7 seconds to start

(truth is that this 6-7 seconds delay happened even if no maximized start but this
case is very-very-very rare)

I will made tests on another PC today.

Reported by nanofoxxx on 2012-10-09 18:56:57

Maximus5 commented 9 years ago
And now!....

The most strange secret revealed in computer history!

(I tracked down what causes 6-7 sec. startup delay :)

Press on Control_panel/Region_and_language/Keyboards_and_Languages/Change_keyboards
and ADD an other layout. For me, I have 2 kind of English layouts (I using only one
but other keyboards _can_appear_ in Windows: for example if I connect Remote Desktop
to my PC from a PC with non-English keyboard or a different variant of English one).

1.) So, You have 2 keyboard layouts.
2.) Set "Monitor console lang" on in ConEmu 
3.a) Start ConEmu Maximized
4.a) Chance is 95% for a 6-7 sec. delay

3.b) Start ConEmu with Normal size
4.b) Chance is 10% for a 6-7 sec. delay

I turned off "Monitor console lang" and ConEmu starts in no time :)

If You don't want to fix this thing then You can make "Monitor console lang" off by
default and add some warning to it's ballon: "Startup delay may occours if more than
1 keyboard layout is used"

Reported by nanofoxxx on 2012-10-16 10:21:15

Maximus5 commented 9 years ago
Funny.
Can you please attach "/log2" generated files?
With delay, of course.

Reported by ConEmu.Maximus5 on 2012-10-16 11:06:55

Maximus5 commented 9 years ago
As I wrote, with /log, no delay happens. MOREOVER I found that delay happens only if
LanguageBar set to hidden (Region & Language/Change keyboard/Language bar/Hidden).
Poltergeist is so common in programming...

I inserted some test printf()-s with timestamps and seems that ConEmu executes function
calls similar with & without /log. I left a comment in .log where is the delay occurs.
Right after:

"CConEmuMain::OnLangChangeConsole (0xA0000409), Posting to main thread"

So, here is maybe a temporal dead-lock? And as I saw ConEmu sets layout 2 times at
startup.

...maximized window, more keyboard layouts, monitor console lang, hidden languagebar
causes startup delay... Programmer's heaven :)

Reported by nanofoxxx on 2012-10-16 15:56:30