change of directory is very slow
Clash 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)
fedora zsh performance git cd-command
 |Â
show 2 more comments
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)
fedora zsh performance git cd-command
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
 |Â
show 2 more comments
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)
fedora zsh performance git cd-command
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
fedora zsh performance git cd-command
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
 |Â
show 2 more comments
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
 |Â
show 2 more comments
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 with2> 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 "$@"
add a comment |Â
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 with2> 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 "$@"
add a comment |Â
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 with2> 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 "$@"
add a comment |Â
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 with2> 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 "$@"
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 with2> 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 "$@"
edited Dec 18 '17 at 12:01
answered Dec 18 '17 at 11:17
Stéphane Chazelas
283k53522859
283k53522859
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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