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

After restarting the PC, ConEmu x64 160522.x64 is slow #692

Closed
glhez opened this issue May 24, 2016 · 20 comments
Closed

After restarting the PC, ConEmu x64 160522.x64 is slow #692

glhez opened this issue May 24, 2016 · 20 comments

Comments

@glhez
Copy link

@glhez glhez commented May 24, 2016

Versions

ConEmu build: ConEmu x64 160522.x64
OS version: Windows 7 Professional (French) x32/x64
Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): cmd 6.1.7601, git version 2.8.3.windows.1

Problem description

I recently updated from 160504 to 160515 (and finally 160522), and I have the same problem each time I restart :

  • running git-cmd is slow (too at least 2 seconds to allow me to come to the prompt)
  • switching from one tab to another is sluggish
  • the first time I had this problem was when I switched from 160504. However, I did not restart in between.

Repairing ConEmu using the option in the installer seems to fix the issue until next restart :

conemu-repair

Steps to reproduce

Initial

  1. Install 150522 (or latest) on top of 150504
  2. Start ConEmu with git-cmd.exe or cmd.exe (it exhibits the same problem).
  3. Start up takes too many time compared to version 150504 or after repair.

After a shutdown / start / restart of the PC

  1. Launch ConEmu after the logon screen
  2. Bash is very slow, cmd start up is slow (and after cmd.exe is started I don't see significant speed down).
  3. Repair ConEmu using the installer from 160522 or 160515.
  4. No more speed down

Actual result

  • Under ConEmu:
$ time sha1sum logback.log
da39a3ee5e6b4b0d3255bfef95601890afd80709 *logback.log

real    0m0.439s
user    0m0.000s
sys     0m0.031s
  • Under git-cmd
$  time sha1sum logback.log
da39a3ee5e6b4b0d3255bfef95601890afd80709 *logback.log

real    0m0.016s
user    0m0.000s
sys     0m0.015s

Expected results

This is the expected result after reinstalling ConEmu - using the "Repair" option:

$ time sha1sum logback.log
da39a3ee5e6b4b0d3255bfef95601890afd80709 *logback.log

real    0m0.016s
user    0m0.000s
sys     0m0.015s

Additional files

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 24, 2016

Repairing ConEmu seems to fix the issue.

What?

https://conemu.github.io/en/ThirdPartyProblems.html

@glhez
Copy link
Author

@glhez glhez commented May 24, 2016

What what ?
I'm speaking about the "Repair" options in the ConEmu installer. I've attached a screenshot because a picture definitively beat a long text that is not read or misunderstood.

Check list based on your link:

  • with same switch than task in Windows + R: see the case "Under git-cmd". No speed down under pure git-cmd ...
  • I tried on Administrator, without any shell profile (I don't use my admin account apart for installing...) either on Bash either on cmd.
  • I can change the buffer size but I think it is irrelevant : it works after using the "repair" in installer and I have the default settings for the admin account and it was slow (see
    settings for the admin account).
  • It is slow even when switching tabs... and I highly doubt this is a behavior of a third party software (and if that was, then it would be mean it was introduced in ConEmu 160515/160522 because I did not install anything apart ConEmu or git-for-windows 2.8.3).
@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 25, 2016

Repairing ConEmu seems to fix the issue.

and

I'm speaking about the "Repair" options in the ConEmu installer. I've attached a screenshot because a picture definitively beat a long text that is not read or misunderstood

It's hard to believe. And it's hard to understand you. Is the issue fixed or not??

Anyway. Repairing (MSI) is doing only one thing: it rechecks all ConEmu binaries and restores proper versions, if they mismatch. And the same installer can't install wrong versions of binaries. It just has not other versions inside than proper ones.

So, I do not believe that it's a ConEmu problem, but seems like smth on you PC slow down ConEmu somehow.

Re-check and describe what happens with binaries, updates and slow-downs. Also, downgrade to proper version (160504?) and re-check it.

At last, try to run ConEmu.exe -basic -run {cmd} and try to create tabs and switch between them. Slowdowns?

@princemaple
Copy link

@princemaple princemaple commented May 25, 2016

Hi @Maximus5 I've been having the same issue.

It's true, as @glhez reported, that after re-installing ConEmu the problem goes away.
And, restarting the system would make the problem reappear.

With some minor digging, I've noticed that the slowness/sluggishness only appears when ConEmu is working with a bash shell or calling to bash related executable that come with git installation.

Has there been any change to inter process communication / new process creation?

I also tried re-installing git, made no difference.

EDIT: I don't see any slowdown when switching between tabs. Only that when creating new bash tabs the prompt is slow to become ready.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 25, 2016

There were no changes in the interprocess communication.

Still waiting for confirmation of previous builds behavior.

Also, what about CPU usages of ConEmu and spawned processes? Use ProcessExplorer to check.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 25, 2016

@princemaple And I don't believe that the problem is not reproduced in the RealConsole, when your git's bash is started outside of the ConEmu.

Third-party application problems

@princemaple
Copy link

@princemaple princemaple commented May 25, 2016

@Maximus5 you are right, the real console has the same problem.

There is no problem, though, when trying to run commands from raw git bash.

So I used ProcessExplorer, as you suggested, to see what's going on.
I discovered that when it's slow in ConEmu, there is a process named MsMpEng.exe that takes quite some CPU. It seems to be the anti malware thing in Windows. I repaired ConEmu as @glhez described, and went through the same series of commands, and everything ran smoothly as expected. I found that MsMpEng.exe didn't spike nearly as much as before repair. Could it be anything related to program signing?

Let me know if there's anything more I can help with.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 25, 2016

There is no "raw git bash". What exactly do you mean by this??

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 25, 2016

I can not do anything with MS antimalware service. Complain to MS about it...

@princemaple
Copy link

@princemaple princemaple commented May 25, 2016

Forgive my ignorance, by raw git bash I meant "bash not wrapped in ConEmu"

2016-05-25

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 25, 2016

@princemaple Screenshot is not an answer, unfortunately. What terminal it is? What exactly do you start?

@princemaple
Copy link

@princemaple princemaple commented May 25, 2016

It comes with git installation for windows, from https://git-scm.com/. I thought you'd know. Sorry.

Just checked....
It is surprisingly just cmd.exe, I don't know what else information I can provide.
So the "raw bash" I ran is just a .lnk for C:\Users\chenp\AppData\Local\Programs\Git\git-bash.exe --cd-to-home. When using this thing, running the commands that could be slow in ConEmu, for some reason, wouldn't be slow.

@princemaple
Copy link

@princemaple princemaple commented May 25, 2016

I understand that it could be annoying to you to receive seemingly random bug reports. I'll try and dig further. I'll report here if I get anything valuable. Thanks for the responses!

@princemaple
Copy link

@princemaple princemaple commented May 25, 2016

OK @glhez @Maximus5 I've got somewhere.

I excluded several executables that come with git installation, that I saw taking significant time fraction being the active process (displayed on ConEmu status bar, thanks!), from real-time protection.
Here's the list

  • bash.exe
  • dirname.exe
  • git.exe
  • perl.exe
  • sed.exe
  • sh.exe
  • uname.exe

After doing so, ConEmu runs blazing fast again :)
I tried but couldn't find a better solution that doesn't require whitelisting a bunch of process names.

@glhez
Copy link
Author

@glhez glhez commented May 25, 2016

I'll try that tonight (I'm at work and I don't have Ms antivirus but Norton) by first disabling it then with exclusion list.
Thanks @princemaple

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented May 25, 2016

@glhez So, do you experience this problem with Norton antivirus? Or MS only?

@princemaple I didn't understand. Have you tried to rollback ConEmu version? I suppose the issue is not related actually to ConEmu updates.

@glhez
Copy link
Author

@glhez glhez commented May 25, 2016

@Maximus5 I will close the issue because the solution reported by @princemaple worked for me, although I needed to reboot the PC.

I'm sorry for the inconvenience but still think it's strange that the MS AV made ConEmu slow but not after reinstalling it.

With Norton/Symantec, I can't disable it or ignore files from analysis so I can't test.

All that I can say is that I'm under the impression it seems globally slower at work than at home but it is usable (this issue made ConEmu far more slower in comparison).

For the test I made tonight:

  • 160522 MS "Real Time Protection" disabled: no problem
  • Rollback to 160504 + MS "Real Time Protection" enabled (after reboot): slow. I'm guessing that now that MS do something (but what?) with ConEmu, it apply to each version :/
  • 160522 MS "Real Time Protection" enabled + ignore list for C:\Program Files\Git , C:\Program Files\ConEmu and C:\Program Files (x86)\clink: unlike disabled the Real Time Protection, this need the PC to be rebooted for the changes to be noticeable. So, it works with a reboot..

My guess is that the MS AV was updated (it is on automatic mode) some time before I was switching to 160515.

@glhez glhez closed this May 25, 2016
@princemaple
Copy link

@princemaple princemaple commented May 26, 2016

@Maximus5 no I didn't try the rollback approach, since repair actually did do something, I already assumed it's not ConEmu that's doing things wrong. Still have no idea why MS Defender pays extra attention to all the git commands after restart, though.

@glhez That's weird, it worked live for me. I literally had both Settings and ConEmu open, trying the process names one by one.

@glhez
Copy link
Author

@glhez glhez commented May 26, 2016

I think that's because you added path to executable rather than whole directory.
I would not be surprised to hear that when starting internally the AV list all the executable in that directory to disallow new program (= potential new virus).

@princemaple
Copy link

@princemaple princemaple commented May 26, 2016

@glhez ah that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants