Skip to content

[Bug] cmder loads very slowly under Windows #2816

Description

@minstyle

Version Information

Cmder version: v1.3.21 (1.3.20.151)
Clink: v1.4.11
git: version 2.39.1.windows.1
ConEmu: 221218 [64] Stable

Operating system: Windows 10 Pro 22H2 (Build 19045.2486)

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

  • I have read the documentation.
  • I have searched for similar issues and found none that describe my issue.
  • I have reproduced the issue on the latest version of Cmder.
  • I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.

Activity

  1. mpitz commented on Jan 18, 2023

    @mpitz

    Same here!

    Cmder version: v1.3.21 (1.3.20.151)
    Clink: v1.4.10.45c041
    git: version 2.39.0.windows.1
    ConEmu: 221218 [64] Stable
    
    Operating system: Windows 11 Pro 22H2 (Build 22621.1105)
    
  2. Lari0 commented on Jan 18, 2023

    @Lari0

    Hi,
    Same here , it takes 20 or more seconds with /f and close to 60 without /f .
    Also tried adding variable of git location , this improves startup for few seconds.

    Elapsed Time: 0:0:22.87 (22.87s total)

    Microsoft Windows [Version 10.0.19045.2251] - Windows 10 Pro 22H2
    cmder 1.3.20.151

  3. chrisant996 commented on Jan 19, 2023

    @chrisant996
    Contributor

    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.

  4. daxgames commented on Jan 19, 2023

    @daxgames
    Member

    I can not duplicate this.

  5. WickedSilver commented on Jan 19, 2023

    @WickedSilver

    I can not duplicate this.

    Is there any thing we can do to help you to reproduce this?

  6. mpitz commented on Jan 19, 2023

    @mpitz

    Don't know if it helps but starting Cmder I can see rotating cmd.exe and findstr.exe in the lower tab:

    image

    Happens on my Windows 10 Pro private PC and my Windows 11 Pro office PC. On the office PC the startup takes significant more time than on the Win 10 machine.

    • Win 10: 10 sec
    • Win 11: 30 sec
  7. daxgames commented on Jan 19, 2023

    @daxgames
    Member

    @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.

  8. mpitz commented on Jan 19, 2023

    @mpitz

    @daxgames maybe, but my work PCs has no extra firewall restrictions, I'am admin user. It's like a private PC.

  9. daxgames commented on Jan 19, 2023

    @daxgames
    Member

    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.

  10. daxgames commented on Jan 19, 2023

    @daxgames
    Member

    @mpitz I'm just telling you historical experience. It comes up a lot.

  11. js-compilatrum commented on Jan 19, 2023

    @js-compilatrum

    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.

  12. chrisant996 commented on Jan 19, 2023

    @chrisant996
    Contributor

    Here are some ideas to try, to learn more about where the delay is coming from:

    • Try using Task Manager or Process Explorer to observe what processes are using CPU during the 10-30 second delay. For example, it might show that some antivirus system is spending a lot of CPU.
    • Try set PATH to check what the system path looks like. For example, if it has UNC paths in the system PATH then that will make network calls when searching to find executables, and that could introduce delays. Or there might be extra unexpected paths in the PATH that might slow things down.
  13. Dzoukr commented on Jan 20, 2023

    @Dzoukr

    Don't know if it helps but starting Cmder I can see rotating cmd.exe and findstr.exe in the lower tab:

    image

    Happens on my Windows 10 Pro private PC and my Windows 11 Pro office PC. On the office PC the startup takes significant more time than on the Win 10 machine.

    • Win 10: 10 sec
    • Win 11: 30 sec

    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?

  14. 142 remaining items

  15. chrisant996 commented on Nov 27, 2023

    @chrisant996
    Contributor

    @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.

  16. Marco-Sulla commented on Nov 28, 2023

    @Marco-Sulla

    I added some time logs to the init.bat:
    init.zip

    The problem is here (10s wasted), but it makes no sense because there's no command between the logs:

    enhance_path git end 2 10:26:41.66
    enhance_path git end 3 10:26:46.04
    
    git_locale end 2 10:26:46.11
    endlocal start 10:26:50.10
    
  17. chrisant996 commented on Nov 28, 2023

    @chrisant996
    Contributor

    Yes, that's interference from antivirus/etc.

    There aren't any CMD commands between those two echo commands, but there is the end ) after finishing the if defined git_locale ( ... ) block that was just evaluated with enabledelayedexpansion. That ) triggers a bunch of system API calls and file IO for opening the .bat file again and parsing a next command, and getting/setting the console title, and a bunch of other minutia that involve system APIs.

    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.

  18. Marco-Sulla commented on Nov 30, 2023

    @Marco-Sulla

    I added init.bat to the Windows Defender exclusion list, but the start time continues to be 20s. Should I put other files or directories in exclusion list?

  19. DRSDavidSoft commented on Nov 30, 2023

    @DRSDavidSoft
    Contributor

    @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.

  20. daxgames commented on Nov 30, 2023

    @daxgames
    Member

    With eset nod people were adding cmd.exe to solve the slowness. I doubt adding the cmder root folder will do much to speed things up.

    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.

  21. Crayder commented on Jan 29, 2024

    @Crayder

    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.

  22. chrisant996 commented on Jan 29, 2024

    @chrisant996
    Contributor

    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.

  23. SMUsamaShah commented on Feb 19, 2024

    @SMUsamaShah

    After every single command even a simple echo or cd it was starting a 2 cmd.exe and 1 git.exe (that i could see in status bar). Meaning this was adding delay of 1-2s after every single command. Not counting the initial console startup time here.

    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.

  24. chrisant996 commented on Feb 20, 2024

    @chrisant996
    Contributor

    @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.

  25. SMUsamaShah commented on Feb 20, 2024

    @SMUsamaShah

    The cmder I replaced (moved to another folder) was Version 1.3.19.1181.
    The cmder mini I am now using is Version 1.3.24.236.
    Have git installed in Program Files already anyway.

    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 cd . (which is an alias to cd /d $*) on Version 1.3.19.1181. cd command completes, then does the other git related stuff.

    Process Monitor shows cmd.exe being started with cmd.exe /c git --no-pager config cmder.status 2>nul, then it starts git --no-pager config cmder.status which runs git.exe again with same command but using git.exe from mingw64\bin dir. Same cmd and git processes run once again. And then my cd command finally completes.

  26. daxgames commented on Feb 20, 2024

    @daxgames
    Member

    @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.

  27. SMUsamaShah commented on Feb 20, 2024

    @SMUsamaShah

    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.

  28. chrisant996 commented on Feb 20, 2024

    @chrisant996
    Contributor

    The cmder I replaced (moved to another folder) was Version 1.3.19.1181.
    The cmder mini I am now using is Version 1.3.24.236.

    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.

  29. SMUsamaShah commented on Feb 20, 2024

    @SMUsamaShah

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions