change of directory is very slow

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












from time to time changing to a directory (through terminal) launches git process which takes 100% of CPU time and up to 5-6 seconds during which my console is absolutely unresponsive.



This doesn't happen every time when I navigate to this directory, but it happens several times during the day.



After 5-7 seconds git process is gone and I get into the directory



Any ideas?



my ~.zshrc is here



➜ Config git:(develop) uname -a 
Linux dmitry 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
➜ Config git:(develop) zsh --version
zsh 5.3.1 (x86_64-redhat-linux-gnu)
➜ Config git:(develop)
➜ Config git:(develop) bash --version
GNU bash, version 4.4.12(1)-release (x86_64-redhat-linux-gnu)









share|improve this question



















  • 3




    Your zsh/git configurations are going to be critical to diagnosing this.
    – Jeff Schaller
    Oct 9 '17 at 23:19






  • 1




    Are you using some git command to set (parts of) your shell prompt?
    – NickD
    Oct 10 '17 at 0:01






  • 1




    I have added .zshrc config. I'm using antigen to load modules and display status info in the prompt. It gets some info from git, but I have no custom invocation of git by my own code. It just started to happen last week and infrequently. Like 2-3 times a day.
    – DmitrySemenov
    Oct 10 '17 at 0:13










  • Is this directory on a local disk or some network share?
    – Andy Dalton
    Oct 10 '17 at 3:38










  • Local, ssd disks @AndyDalton
    – DmitrySemenov
    Oct 10 '17 at 5:38














up vote
2
down vote

favorite












from time to time changing to a directory (through terminal) launches git process which takes 100% of CPU time and up to 5-6 seconds during which my console is absolutely unresponsive.



This doesn't happen every time when I navigate to this directory, but it happens several times during the day.



After 5-7 seconds git process is gone and I get into the directory



Any ideas?



my ~.zshrc is here



➜ Config git:(develop) uname -a 
Linux dmitry 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
➜ Config git:(develop) zsh --version
zsh 5.3.1 (x86_64-redhat-linux-gnu)
➜ Config git:(develop)
➜ Config git:(develop) bash --version
GNU bash, version 4.4.12(1)-release (x86_64-redhat-linux-gnu)









share|improve this question



















  • 3




    Your zsh/git configurations are going to be critical to diagnosing this.
    – Jeff Schaller
    Oct 9 '17 at 23:19






  • 1




    Are you using some git command to set (parts of) your shell prompt?
    – NickD
    Oct 10 '17 at 0:01






  • 1




    I have added .zshrc config. I'm using antigen to load modules and display status info in the prompt. It gets some info from git, but I have no custom invocation of git by my own code. It just started to happen last week and infrequently. Like 2-3 times a day.
    – DmitrySemenov
    Oct 10 '17 at 0:13










  • Is this directory on a local disk or some network share?
    – Andy Dalton
    Oct 10 '17 at 3:38










  • Local, ssd disks @AndyDalton
    – DmitrySemenov
    Oct 10 '17 at 5:38












up vote
2
down vote

favorite









up vote
2
down vote

favorite











from time to time changing to a directory (through terminal) launches git process which takes 100% of CPU time and up to 5-6 seconds during which my console is absolutely unresponsive.



This doesn't happen every time when I navigate to this directory, but it happens several times during the day.



After 5-7 seconds git process is gone and I get into the directory



Any ideas?



my ~.zshrc is here



➜ Config git:(develop) uname -a 
Linux dmitry 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
➜ Config git:(develop) zsh --version
zsh 5.3.1 (x86_64-redhat-linux-gnu)
➜ Config git:(develop)
➜ Config git:(develop) bash --version
GNU bash, version 4.4.12(1)-release (x86_64-redhat-linux-gnu)









share|improve this question















from time to time changing to a directory (through terminal) launches git process which takes 100% of CPU time and up to 5-6 seconds during which my console is absolutely unresponsive.



This doesn't happen every time when I navigate to this directory, but it happens several times during the day.



After 5-7 seconds git process is gone and I get into the directory



Any ideas?



my ~.zshrc is here



➜ Config git:(develop) uname -a 
Linux dmitry 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
➜ Config git:(develop) zsh --version
zsh 5.3.1 (x86_64-redhat-linux-gnu)
➜ Config git:(develop)
➜ Config git:(develop) bash --version
GNU bash, version 4.4.12(1)-release (x86_64-redhat-linux-gnu)






fedora zsh performance git cd-command






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 10 '17 at 0:11

























asked Oct 9 '17 at 23:04









DmitrySemenov

23419




23419







  • 3




    Your zsh/git configurations are going to be critical to diagnosing this.
    – Jeff Schaller
    Oct 9 '17 at 23:19






  • 1




    Are you using some git command to set (parts of) your shell prompt?
    – NickD
    Oct 10 '17 at 0:01






  • 1




    I have added .zshrc config. I'm using antigen to load modules and display status info in the prompt. It gets some info from git, but I have no custom invocation of git by my own code. It just started to happen last week and infrequently. Like 2-3 times a day.
    – DmitrySemenov
    Oct 10 '17 at 0:13










  • Is this directory on a local disk or some network share?
    – Andy Dalton
    Oct 10 '17 at 3:38










  • Local, ssd disks @AndyDalton
    – DmitrySemenov
    Oct 10 '17 at 5:38












  • 3




    Your zsh/git configurations are going to be critical to diagnosing this.
    – Jeff Schaller
    Oct 9 '17 at 23:19






  • 1




    Are you using some git command to set (parts of) your shell prompt?
    – NickD
    Oct 10 '17 at 0:01






  • 1




    I have added .zshrc config. I'm using antigen to load modules and display status info in the prompt. It gets some info from git, but I have no custom invocation of git by my own code. It just started to happen last week and infrequently. Like 2-3 times a day.
    – DmitrySemenov
    Oct 10 '17 at 0:13










  • Is this directory on a local disk or some network share?
    – Andy Dalton
    Oct 10 '17 at 3:38










  • Local, ssd disks @AndyDalton
    – DmitrySemenov
    Oct 10 '17 at 5:38







3




3




Your zsh/git configurations are going to be critical to diagnosing this.
– Jeff Schaller
Oct 9 '17 at 23:19




Your zsh/git configurations are going to be critical to diagnosing this.
– Jeff Schaller
Oct 9 '17 at 23:19




1




1




Are you using some git command to set (parts of) your shell prompt?
– NickD
Oct 10 '17 at 0:01




Are you using some git command to set (parts of) your shell prompt?
– NickD
Oct 10 '17 at 0:01




1




1




I have added .zshrc config. I'm using antigen to load modules and display status info in the prompt. It gets some info from git, but I have no custom invocation of git by my own code. It just started to happen last week and infrequently. Like 2-3 times a day.
– DmitrySemenov
Oct 10 '17 at 0:13




I have added .zshrc config. I'm using antigen to load modules and display status info in the prompt. It gets some info from git, but I have no custom invocation of git by my own code. It just started to happen last week and infrequently. Like 2-3 times a day.
– DmitrySemenov
Oct 10 '17 at 0:13












Is this directory on a local disk or some network share?
– Andy Dalton
Oct 10 '17 at 3:38




Is this directory on a local disk or some network share?
– Andy Dalton
Oct 10 '17 at 3:38












Local, ssd disks @AndyDalton
– DmitrySemenov
Oct 10 '17 at 5:38




Local, ssd disks @AndyDalton
– DmitrySemenov
Oct 10 '17 at 5:38










1 Answer
1






active

oldest

votes

















up vote
1
down vote













You'll probably have to debug it yourself as your ~/.zshrc is very specific and uses many third party extensions.



Some debugging tools that will help you here:




  • PS4='+[%D%T.%.] %N:%i> ' zsh -x



    and try to reproduce the problem.



    That will log all commands run by zsh with some timing so you can identify which one takes a lot of time and what is calling it.



    You may want to run that under script (see also its -t option) or with 2> file.log as the output is likely to be very copious.




  • strace -tte execve -s 999 -o strace.log zsh



    That traces all command executions again with timing.



You could also instrument calls to git only with something like:



git() 
local PS4='[%D%T.%.] %N:%i:'
print -u2 -f '-> %s (%s)n' $funcstack:^funcfiletrace
set -o localoptions -o xtrace
command git "$@"






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397135%2fchange-of-directory-is-very-slow%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    You'll probably have to debug it yourself as your ~/.zshrc is very specific and uses many third party extensions.



    Some debugging tools that will help you here:




    • PS4='+[%D%T.%.] %N:%i> ' zsh -x



      and try to reproduce the problem.



      That will log all commands run by zsh with some timing so you can identify which one takes a lot of time and what is calling it.



      You may want to run that under script (see also its -t option) or with 2> file.log as the output is likely to be very copious.




    • strace -tte execve -s 999 -o strace.log zsh



      That traces all command executions again with timing.



    You could also instrument calls to git only with something like:



    git() 
    local PS4='[%D%T.%.] %N:%i:'
    print -u2 -f '-> %s (%s)n' $funcstack:^funcfiletrace
    set -o localoptions -o xtrace
    command git "$@"






    share|improve this answer


























      up vote
      1
      down vote













      You'll probably have to debug it yourself as your ~/.zshrc is very specific and uses many third party extensions.



      Some debugging tools that will help you here:




      • PS4='+[%D%T.%.] %N:%i> ' zsh -x



        and try to reproduce the problem.



        That will log all commands run by zsh with some timing so you can identify which one takes a lot of time and what is calling it.



        You may want to run that under script (see also its -t option) or with 2> file.log as the output is likely to be very copious.




      • strace -tte execve -s 999 -o strace.log zsh



        That traces all command executions again with timing.



      You could also instrument calls to git only with something like:



      git() 
      local PS4='[%D%T.%.] %N:%i:'
      print -u2 -f '-> %s (%s)n' $funcstack:^funcfiletrace
      set -o localoptions -o xtrace
      command git "$@"






      share|improve this answer
























        up vote
        1
        down vote










        up vote
        1
        down vote









        You'll probably have to debug it yourself as your ~/.zshrc is very specific and uses many third party extensions.



        Some debugging tools that will help you here:




        • PS4='+[%D%T.%.] %N:%i> ' zsh -x



          and try to reproduce the problem.



          That will log all commands run by zsh with some timing so you can identify which one takes a lot of time and what is calling it.



          You may want to run that under script (see also its -t option) or with 2> file.log as the output is likely to be very copious.




        • strace -tte execve -s 999 -o strace.log zsh



          That traces all command executions again with timing.



        You could also instrument calls to git only with something like:



        git() 
        local PS4='[%D%T.%.] %N:%i:'
        print -u2 -f '-> %s (%s)n' $funcstack:^funcfiletrace
        set -o localoptions -o xtrace
        command git "$@"






        share|improve this answer














        You'll probably have to debug it yourself as your ~/.zshrc is very specific and uses many third party extensions.



        Some debugging tools that will help you here:




        • PS4='+[%D%T.%.] %N:%i> ' zsh -x



          and try to reproduce the problem.



          That will log all commands run by zsh with some timing so you can identify which one takes a lot of time and what is calling it.



          You may want to run that under script (see also its -t option) or with 2> file.log as the output is likely to be very copious.




        • strace -tte execve -s 999 -o strace.log zsh



          That traces all command executions again with timing.



        You could also instrument calls to git only with something like:



        git() 
        local PS4='[%D%T.%.] %N:%i:'
        print -u2 -f '-> %s (%s)n' $funcstack:^funcfiletrace
        set -o localoptions -o xtrace
        command git "$@"







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 18 '17 at 12:01

























        answered Dec 18 '17 at 11:17









        Stéphane Chazelas

        283k53522859




        283k53522859



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397135%2fchange-of-directory-is-very-slow%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay