-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Bug] cmder loads very slowly under Windows #2816
Comments
Same here!
|
Hi, Elapsed Time: 0:0:22.87 (22.87s total) Microsoft Windows [Version 10.0.19045.2251] - Windows 10 Pro 22H2 |
I am using Cmder 1.3.21 Mini version, with Windows 10 Pro 22H2 19045.2486, and it takes about 2 seconds to start. I have git for Windows installed, and Cmder finds it successfully. |
I can not duplicate this. |
Is there any thing we can do to help you to reproduce this? |
@mpitz 10 seconds is too long. The difference between home and work pc does not surprise me at all. Work PCs are commonly reported as slower with Cmder. |
@daxgames maybe, but my work PCs has no extra firewall restrictions, I'am admin user. It's like a private PC. |
When I said I can not reproduce this I was in a hurry. The only Windows 10 I have tested on is version 10.0.19044 21H2.2486 and according to Windows Ulpdate is up to date. I am running Windows 10 on a 8GB Virtualbox VM on an older I5 laptop with slow spindle HDD and even on this older system Cmder starts in 3.68 seconds. I will try and find another system in my stack of old hardware and see what I have to try and reproduce but if I can't get the version you guys say the issue started at I'm not sure what to do. |
@mpitz I'm just telling you historical experience. It comes up a lot. |
Version mini and full at Microsoft Windows [Version 10.0.22621.1105] is very slow. It was checked on 128 GB RAM, 13700 CPU so hardware should will not be issue here. Older version on laptop is extremaly fast in comparision. |
Here are some ideas to try, to learn more about where the delay is coming from:
|
Absolutely the same here for me on Win 10 with cmder mini. I also tried to observe Task manager, but nothing significant there... Any idea what could cause it? |
What does I ask because I see multiple |
I cannot reproduce this issue. I would love to see the output of path commands as requested above. |
Here's some debug-output:
|
Note that this behavior I had first experiened on Windows 10 22H1 when I updated Cmder from an older version. I don't know which version I had before, but with that, the startup-time was 1-2sec. |
Same problem here when I started Cmder today after I haven't used it for 2-3 weeks: Output of
|
@d4k0 While this probably isn't responsible for the delay, that PATH variable has several duplicates:
Repeated directories can slow down launching programs, by searching the directories multiple times. Cleaning up the variable might be generally useful, but the duplicate directories probably aren't causing 40 seconds of slowdown, so the cause is probably something else yet to be discovered. In the meantime, if you clean that up, make a backup copy of the contents of the PATH variable first, so that it can be restored if something goes wrong while cleaning it up. |
Can someone try downgrading to an older version of Cmder or ConEmu, and see if the problem goes away? If downgrading ConEmu resolves the problem, then the issue is likely something in ConEmu, not Cmder. If downgrading ConEmu doesn't resolve the problem, but downgrading Cmder resolves the problem, then there would be a possibility that the issue might be due to some recent change in the Cmder scripts. |
I'll try it tomorrow. 👍 |
@DRSDavidSoft @daxgames cmder init debug logging can show elapsed time of the whole init. Is there a way to see times along the way, to help identify where delays occur? |
@andrej-dyck is there really something in your path worth redacting? |
Yes. But all paths only use the English letters and some use a space in-between words. |
@chrisant996 not currently |
@chrisant996 I have an older version of mini that i haven't updated in a while and that used to work fine(1.3.16.1035 with conemu 210912). Problem manifests same as with a freshly downloaded version. @daxgames I've cleaned my path and that didn't help, so that's not it. I'm also unable to replicate this in a fresh VM with an up to date W10. Tricky. I was going to ask the same as @chrisant996 about a timestamped log file... |
Looking at what it would take to add timestamps to the log.can't guarantee anything. My Bengals are playing and I am watching that. GO BENGALS - WOD-DEY! |
@chrisant996 so I should jut remove the error checking? |
@daxgames That would be nice, even if it's only a cosmetic thing, at least for this independent build :P |
@chrisant996 @pmsobrado Let me look at the linked issue more closely and figure out what to do. Not going to be able to immediately look at it though. |
No rush! Thanks! |
Fixed here when its finished building. |
Damn, what took you so long? 😄 Thanks! |
@daxgames I added a comment in #2800.
|
@pmsobrado we aim to please! |
@pmsobrado Sorry for the message, you can blame me for the false error message. I fixed it in the master, hopefully, @chrisant996 approves |
@DRSDavidSoft Don't you worry! I've left you some feedback on #2800 :) |
ESET has released a few new versions since January that significantly improved the problem. Here are a few results from me: cmder 1.3.24: cmder 1.3.21: It's still a bit slower, but significantly better than before. I have therefore removed the exception for At work we use Trellix (they were previously called McAfee Enterprise). A few months ago, there were the same long loading times with Can anyone confirm this? |
I have the same problem. ~20 seconds without How can I trace in details the time each step of the I have: |
@Marco-Sulla Slowness is typically something on the host computer that is inspecting every API call, such as Antivirus or Data Loss Prevention or security tools. This is more common on corporate managed systems, but also some Antivirus programs malfunction sometimes. What Antivirus suites are on your machine? Do you have ESET? ESET's "Deep Behavioral Inspection" feature has had problems in the past where it introduced significant delays while starting programs. |
I added some time logs to the init.bat: The problem is here (10s wasted), but it makes no sense because there's no command between the logs:
|
Yes, that's interference from antivirus/etc. There aren't any CMD commands between those two The antivirus/etc software is intercepting one or more of the APIs and decides that it wants to do some extra processing, and the extra processing takes a bunch of time. I agree that it doesn't make sense why that would be needed or take so long. But it's a bug or malfunction in the antivirus/etc software -- for whatever reason, it got confused into thinking it needed to be extra work. You'd need to identify all the antivirus and DLP and corporate monitoring tools that are installed, and try to narrow down specifically which of them are going awry, and report the issue to the respective support team for whichever software(s) are involved. There's unfortunately nothing Cmder or ConEmu can do about this, because it's happening externally from them. |
I added |
@Marco-Sulla either add the entire cmder_root directory as an exception, or temporary turn Defender's real time protection off to verify that the 20 second delay is gone. |
With eset nod people were adding Edit: I do not recommend doing the above. I'm just letting you know what others have done to temporarily work around overly aggressive DLP/Anti-Virus apps until they are fixed. |
Sorta unproductive comment... but I just wanted to mention that this magically fixed itself for me. I never did the fix above. It just started loading like normal last week. Not even updated. Nothing with cmder or clink has changed on my PC in months. My only guess is something with windows updates. |
Caused/resolved by anti-virus updates. See earlier analysis and explanations. |
After every single command even a simple After reading comments, I replaced my cmder-full installation with cmder-mini (which excludes git). Now there isn't no delay after running each command. |
@SMUsamaShah That's interesting... What version of Cmder are you using? In recent versions of Cmder, git.exe gets launched in the background and does not create any delay at all, no matter how long the git.exe command takes to run -- when the background git.exe finishes, then the prompt refreshes to show the new info. (There are some configuration settings that can forcibly disable that, and force git.exe to run in the foreground and introduce delays. But since you didn't mention configuring those, I'm assuming they aren't the issue.) You could consider trying recent pre-release builds of Cmder that are not published yet. They have some improvements, and it's been a while since an update to Cmder was published, so you might not have the improvements yet. If you look around in recent issues you can find links e.g. from daxgames. |
The cmder I replaced (moved to another folder) was I tried looking for a simple way to find out why its running those processes, debug logs don't tell this info. While writing this comment I ran procmon.exe. Then did a simple
|
@chrisant996 @SMUsamaShah I am not certain the newest Cmder release includes background prompt refresh. Probably need to get a pre-rel!ase archive and try it. |
May be it does. Because if I go to a git directory I can see the same cmd.exe and git.exe being run on the status bar but they no longer halt my command. So they are running in background as they should. So may be the packaged git and separate git installation (Program Files) was causing some weird behaviour making it run in foreground for every command, even when i wasn't in a git based dir. |
That was the problem. .19 had a bug that ran part of the git stuff in the foreground by accident. Upgrading to .24 would solve the problem, because the fix was made between those versions. In general, when an issue is encountered in a program, it's handy to check if the latest version fixes it. |
Right, Thanks. I checked for update within cmder but because it only checks for conemu updates, it fooled me into thinking I have up-to-date version of cmder too. Before writing down this comment I didn't know that right way to check cmder versions is to look into its folder and see the Version file. May be there is another way but I don't know about it. |
Version Information
Cmder Edition
Cmder Full (with Git)
Description of the issue
Since the latest Windows 10 update 22H2, it takes 30 seconds or more for cmder to load. It also takes this long when creating new tab windows in cmder. The problem exists with different Windows 10 computers at different work spaces and locations (private, work and Home Office).
How to reproduce
No response
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: