cmder is extremely slow

Created on 10 Dec 2015  ·  61Comments  ·  Source: cmderdev/cmder

Hi,

Cmder is very slow (I don't know if it's only me or not, I guess not).

  • It takes about 6 seconds to open a new tab (cmd/powershell with the injections)
  • 1.5-2 seconds to get output after pressing enter (even if it was an empty command. just pressing enter)
  • The thing that takes most of the time from what I've seen, is the process of what cmder.lua does. Without it it takes significant less time to do simple operations (still not speedy as regular cmd or cygwin, but reasonable).
  • I didn't pass through the script to see what it does (except setting some settings) but another thing that happens is that when I press enter I can see the tab name changing to git.exe and going back to cmd.exe afterwards. This process which I don't know yet why it's happening also slows it down a lot.

Hope those are things that can be fixed!

Please tell me if there's something I can check to help with that. It's a great tool and it's frustrating that I can't use it.

Thanks! :sunny:
Ariel




_If needed, I can record my screen while doing simple actions to demonstrate it_ :video_camera: :computer:

❌ Outdated Installation

Most helpful comment

I tried a few more times to reinstall cmder, now I'm with 1.3 pre and it's pretty much fine compared to what I had before. On 1.2 I encountered the most slowness in git folders (not that others were fast..).

Anyway, I still think it can be better, the problem is that I don't know what affects the slowness of cmder, maybe it's some settings, another programs etc.

_If you also have this problem, react with :+1: on the issue itself, that way not all of the participants will get notifications for every +1 comment!_

All 61 comments

It is same for me. That should caused by git. How can I disable the git prompt plugin?

I just replace below line with return false to speed up.
https://github.com/cmderdev/cmder/blob/master/config/cmder.lua#L61

didn't helped :cry:

I also have extremely slow cmder but only when I connect trough remote desktop. The host machine is Windows 7 enterprise. KBD input takes 4-5 seconds per character. Opening cmder takes more than 6 seconds. All other console windows (cmd, bash, PS) are OK

How can I help to fix this?

PS: Probably this is the correct issue for my problem => https://github.com/cmderdev/cmder/issues/644

Cmder is insanely slow for me too since the update !

on my personal computer (windows 10) it's extremely slow, but on my work computer (windows 7) it's pretty fine.

@bliker any idea?

same here !

+1

+1

Same here!

A lot of this is resolved in the CI builds, newer versions of completions in cmd and powershell are a lot faster.

I'm hoping to have a pre-release available soon.

@MartiUK: Awesome! Looking forward to it! :+1:

If it can help, running cmder as admin seems to solve the problem on my computer. (At least it isn't as slow..)

+1, same issue. It does not happens 100% of times though, sometimes restarting cmder fixes the problem.

+1

This happens to me usually when I launch cmder with a split panel configuration. Most of the times one of the panels will be fine and the other would be really slow to react to input. Agree that it usually works itself out if I close cmder and try opening it again.

+1

This happens to me intermittently as well. Cmder is great 90% of the time, but occasionally (eventually?) it slows down to an insane crawl. A reboot is always needed to fix it.

No fair...... I get i7 process and 16GB memory with 0s cmd start up time......

It takes me more than 40 seconds to start cmder in a non git directory. I have no idea why it is soooooooo slow.

As a hint for anyone here:
I took the latest v1.3.0-pre tag, and it's almost real time for me if compared to the previous v1.2.9 release (which used to take 5 seconds every command).

I have been using 1.3.0 pre for a long time and every now and then vim freaks out and hogs 98% cpu. Only way to recover is to kill vim.exe. No idea why but I have not really tried to figure it out.

I tried a few more times to reinstall cmder, now I'm with 1.3 pre and it's pretty much fine compared to what I had before. On 1.2 I encountered the most slowness in git folders (not that others were fast..).

Anyway, I still think it can be better, the problem is that I don't know what affects the slowness of cmder, maybe it's some settings, another programs etc.

_If you also have this problem, react with :+1: on the issue itself, that way not all of the participants will get notifications for every +1 comment!_

Any word on this? Starting a new PowerShell cmd window takes nearly a minute. It's unusable.

@delscorcho which version of cmder are you on?

1.2.9. It's a lot better with the 1.3.0 pre-release.

I'd like to add small hint to this thread ( and it might be a good idea to add this to the vendor/profile.ps1)
My Posh startup time goes bad beyond imagination (1.3.0 pre with few Azure modules installed takes from 3 to 12 seconds per console start) and after some research I found that this advice from SO is still valid, even for v5. Crazy but fact, start time plummeted down to 1-2 seconds per console start (and profile.ps1 boot time for Powershell is 0.2 secs with posh-git disabled)

Thanks @SCLeoX If I start my cmder on a git folder the problem is solved (i'm using cmder v1.2.9)

@centur which of the answers there were useful for you?

@arieljannai oh, I didn't realize I referenced to the question, not to the answer.

"Run NGEN on Posh binaries." is useful, I have it in my profile script for admin prompt.
I also double-checked and re-enabled scheduler for NGENing my assemblies.

It' still running slow for me. Is anyone else still having this issue?

Post your git, clink and conemu versions pls.

I'm new to this, where can I find the git, clink, and conemu versions?
In the cmder folder there's a file named Version v1.2.9

type git --version clink and conemu -?

git version 2.8.0.windows.1
Clink v0.4.5
ConEmu version 160619 stable

Alright, can you download a test build from here and tell me if that works better, please. https://ci.appveyor.com/project/MartiUK/cmder/build/artifacts

Wow, that's much better.
Thanks!

My version is 160710, problem does not disappear. It takes about 30 seconds to boot up. I can start cmd within 0.5 sec.

i think the culprit is the function

get_git_status()

function get_git_status()
    local file = io.popen("git status --no-lock-index --porcelain 2>nul")
    for line in file:lines() do
        file:close()
        return false
    end
    file:close()
    return true
end

I read that it will takes up so much time
https://gist.github.com/sindresorhus/3898739#gistcomment-1897703
and the fastest is this one ... it makes a lot faster :)

function get_git_status()
    return os.execute("git diff-files --no-ext-diff --quiet")
end

Wouldn't git diff-files --no-ext-diff --quiet || git diff-index --no-ext-diff --quiet --cached HEAD be better then since we probably want indexed and unindexed?

For those who want to disable the Git checking entirely, then check here : https://github.com/cmderdev/cmder/issues/447#issuecomment-244149494

The cmder now open very fast even on the very large Git repository. You guys should check it out. :grin:

:+1:

I use 161206 stable
ssh to some remote machine, open a vim, and :vsp
then move the cursor
...... really really really slow

and the same machine, same scene,xshell will not like this.
any good solution for me?

+1 very slow in where.exe

Can you confirm after whitelisting the exes in your antivirus?

I have the same problem opening the cmder in a large project that has git.

It is very slow, it can reach more than 2 minutes to load.

I have the latest version: v1.3.10

Is there any solution to this issue?

temperory solution:
comment these codes in local function git_prompt_filter() in clink.lua under cmder\vendor folder:

local git_dir = get_git_dir()
    if git_dir then
        -- if we're inside of git repo then try to detect current branch
        local branch = get_git_branch(git_dir)
        local color
        if branch then
            -- Has branch => therefore it is a git folder, now figure out status
            local gitStatus = get_git_status()
            local gitConflict = get_git_conflict()

            color = colors.dirty
            if gitStatus then
                color = colors.clean
            end

            if gitConflict then
                color = colors.conflict
            end 

            clink.prompt.value = string.gsub(clink.prompt.value, "{git}", color.."("..branch..")")
            return false
        end
    end

then cmder will not try to get git status in git folder

Still extremely slow.

@fslayer in what way. I have not seen any slowness beyond some at initial startup. You can add the /f command line switch to the Conemu task that starts the session. This is only applicable for cmder::cmder * sessions. This will take 2-3 seconds off of initial startup of Cmder.

Also what sessions are slow cmd, bash, or powershell.

Also for me it works really - my version 1.3.11.843. It tooks ages to startup also moving from one dir to other take really long. Looking forward for solutions...

I read somewhere(Google how to speed up WSL) Windows Defender affects the speeds of WSL very very much. You can get 5x speed on WSL I/O and other operations by disabling it. Maybe disabling it will also help Cmder.

This ticket is closed but seems like this is still happening, at least for me it happens on a daily basis, super slow to open new tabs and to perform simple things such as an ls.

I solve the problem. I just installed Linux and... problem solved!! :)

Same here

I'm seeing extreme slowness as well.

Smae issue here on a high-end laptop; in 2019

In my case, the slowness was caused by my laptop looking for my employer's domain when I was at home. It seems to be some kind of windows terribleness where the domain lookup has to timeout before cmder (or maybe the underlying msys?) can run anything.

I found a work-around here: http://bjg.io/guide/cygwin-ad/)

Turning off Windows Defender helped a lot for me.

Deleting System98 helped a lot for me.

just remove those function calls , and hard code all env, since you know the very git_install location.
My demo, https://github.com/doglex/Light_Weapon/blob/master/cmder/vendor/init.bat

which is fast
0.5s in HDD
0.1s in SSD

Was this page helpful?
0 / 5 - 0 ratings