[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc-dir operation is very slow on large git repositories in Emacs 26.
From: |
Eli Zaretskii |
Subject: |
Re: vc-dir operation is very slow on large git repositories in Emacs 26.1 |
Date: |
Fri, 22 Jun 2018 11:57:18 +0300 |
> From: Alex Harsanyi <address@hidden>
> Date: Fri, 22 Jun 2018 09:12:29 +0800
> Cc: address@hidden
>
> I set `vc-command-messages`, which prints out the subprocesses run by
> `vc-do-command` and also updated `vc-do-command` to show the time it took for
> each process. It turns out that Emacs 26.1 does run one extra command:
>
> In Emacs 25.2, a "vc-dir" command runs the following:
>
> Running git --no-pager update-index --refresh . in background... done
> 0.48 seconds
> Running git --no-pager diff-index --relative -z -M HEAD -- . in
> background... done 0.42 seconds
> Running git --no-pager ls-files -z -o --directory --no-empty-directory
> --exclude-standard -- . in background... done 0.10 seconds
>
> In Emacs 26.2, a "vc-dir" command runs the following:
>
> Running git --no-pager update-index --refresh . in background... done
> 0.46 seconds
> Running git --no-pager diff-index --relative -z -M HEAD -- . in
> background... done 0.46 seconds
> Running git --no-pager ls-files -z -c -s -- . in background... done 4.49
> seconds
> Running git --no-pager ls-files -z -o --directory --no-empty-directory
> --exclude-standard -- . in background... done 0.09 seconds
>
> The extra command is "git --no-pager ls-files -z -c -s -- ." and it takes 4.5
> seconds to run (I ran each test multiple times and the times are consistent).
> However, when I run that command in a terminal, it finishes in less than a
> second.
But the times you cited originally were much longer: 2 min. What
caused such a stark difference, from 2 min to just 4.5 sec?
> An Emacs-Lisp program to run this script, but ignore all output, it takes 16
> seconds, in both 25.2 and 26.1:
Once again, 16 sec is much shorter than 2 min you originally cited.
> It seems reading output from a process in Emacs is somehow limited to 64 Kb /
> second -- I verified this with procmon. It looks like the behavior is the
> same in 25.2 and 26.1, it is just that in vc-dir 25.2 does not run a git
> command that produces a lot of output.
Does it help to set w32-pipe-buffer-size to some large value, like
16384, and/or decrease w32-pipe-read-delay?
Thanks.
- vc-dir operation is very slow on large git repositories in Emacs 26.1, Alex Harsanyi, 2018/06/20
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1, Eli Zaretskii, 2018/06/20
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1, Alex Harsanyi, 2018/06/20
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1, Eli Zaretskii, 2018/06/21
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1, Alex Harsanyi, 2018/06/21
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1,
Eli Zaretskii <=
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1, Alex Harsanyi, 2018/06/22
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1, Alex Harsanyi, 2018/06/22
- Re: vc-dir operation is very slow on large git repositories in Emacs 26.1, Eli Zaretskii, 2018/06/22
- w32-pipe-read-delay (was: vc-dir operation is very slow on large git repositories in Emacs 26.1), Stefan Monnier, 2018/06/22
- Re: w32-pipe-read-delay (was: vc-dir operation is very slow on large git repositories in Emacs 26.1), Eli Zaretskii, 2018/06/23
- Message not available
- Fwd: w32-pipe-read-delay (was: vc-dir operation is very slow on large git repositories in Emacs 26.1), Alex Harsanyi, 2018/06/23
- Re: w32-pipe-read-delay (was: vc-dir operation is very slow on large git repositories in Emacs 26.1), Alex Harsanyi, 2018/06/23
- Re: w32-pipe-read-delay (was: vc-dir operation is very slow on large git repositories in Emacs 26.1), Eli Zaretskii, 2018/06/23
- Re: w32-pipe-read-delay (was: vc-dir operation is very slow on large git repositories in Emacs 26.1), Alex Harsanyi, 2018/06/23
- Re: w32-pipe-read-delay (was: vc-dir operation is very slow on large git repositories in Emacs 26.1), Eli Zaretskii, 2018/06/23