Re: git status became very slow after upgrading git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for responding. I have run the command that you gave on an open
source repo so that its easy for you to replicate. The remote url is:
https://github.com/vraravam/ferdium-app

The output is:
    ~/d/o/ferdium  on   develop  GIT_TRACE=1 GIT_TRACE_SETUP=1
GIT_TRACE_PERFORMANCE=1 git status
00:08:15.548976 trace.c:314             setup: git_dir: .git
00:08:15.550590 trace.c:315             setup: git_common_dir: .git
00:08:15.550600 trace.c:316             setup: worktree:
/Users/vijay/dev/oss/ferdium
00:08:15.550604 trace.c:317             setup: cwd: /Users/vijay/dev/oss/ferdium
00:08:15.550611 trace.c:318             setup: prefix: (null)
00:08:15.550707 chdir-notify.c:70       setup: chdir from
'/Users/vijay/dev/oss/ferdium' to '/Users/vijay/dev/oss/ferdium'
00:08:15.550723 git.c:463               trace: built-in: git status
00:08:15.552184 read-cache.c:2386       performance: 0.000183000 s:
read cache .git/index
00:08:15.555964 read-cache.c:1629       performance: 0.003696000 s:
refresh index
00:08:15.556442 diff-lib.c:273          performance: 0.000132000 s:  diff-files
00:08:15.558558 unpack-trees.c:2004     performance: 0.000019000 s:
traverse_trees
00:08:15.558801 unpack-trees.c:438      performance: 0.000003000 s:
check_updates
00:08:15.558813 unpack-trees.c:2096     performance: 0.000394000 s:
unpack_trees
00:08:15.558819 diff-lib.c:638          performance: 0.000524000 s:  diff-index
00:08:15.559166 name-hash.c:613         performance: 0.000148000 s:
initialize name hash
On branch develop
Your branch is up to date with 'origin/develop'.

00:08:15.567249 run-command.c:657       trace: run_command:
GIT_INDEX_FILE=.git/index git submodule summary --cached --for-status
--summary-limit -1 HEAD
00:08:15.833334 git.c:749               trace: exec: git-submodule
summary --cached --for-status --summary-limit -1 HEAD
00:08:15.834114 run-command.c:657       trace: run_command:
git-submodule summary --cached --for-status --summary-limit -1 HEAD
00:08:16.880778 trace.c:414             performance: 0.000013000 s:
git command: git --exec-path
00:08:18.216639 git.c:463               trace: built-in: git rev-parse --git-dir
00:08:18.218740 trace.c:414             performance: 0.002132000 s:
git command: git rev-parse --git-dir
00:08:18.489025 git.c:463               trace: built-in: git rev-parse
--git-path objects
00:08:18.490677 trace.c:414             performance: 0.001675000 s:
git command: git rev-parse --git-path objects
00:08:19.031080 git.c:463               trace: built-in: git rev-parse
--show-prefix
00:08:19.032882 trace.c:414             performance: 0.001827000 s:
git command: git rev-parse --show-prefix
00:08:19.296074 git.c:463               trace: built-in: git rev-parse
--show-toplevel
00:08:19.297559 trace.c:414             performance: 0.001504000 s:
git command: git rev-parse --show-toplevel
00:08:19.830285 trace.c:314             setup: git_dir: .git
00:08:19.830972 trace.c:315             setup: git_common_dir: .git
00:08:19.830981 trace.c:316             setup: worktree:
/Users/vijay/dev/oss/ferdium
00:08:19.830984 trace.c:317             setup: cwd: /Users/vijay/dev/oss/ferdium
00:08:19.830990 trace.c:318             setup: prefix: (null)
00:08:19.830994 git.c:463               trace: built-in: git
submodule--helper summary --cached --for-status -n -1 -- HEAD
00:08:19.834629 read-cache.c:2386       performance: 0.000164000 s:
read cache .git/index
00:08:19.834914 unpack-trees.c:2004     performance: 0.000024000 s:
traverse_trees
00:08:19.834932 unpack-trees.c:438      performance: 0.000003000 s:
check_updates
00:08:19.834940 unpack-trees.c:2096     performance: 0.000157000 s:
unpack_trees
00:08:19.834958 diff-lib.c:638          performance: 0.000307000 s:  diff-index
00:08:19.834975 trace.c:414             performance: 0.005922000 s:
git command: git submodule--helper summary --cached --for-status -n -1
-- HEAD
00:08:19.836137 trace.c:414             performance: 4.003693000 s:
git command: /opt/homebrew/opt/git/libexec/git-core/git submodule
summary --cached --for-status --summary-limit -1 HEAD
00:08:19.836842 run-command.c:657       trace: run_command:
GIT_INDEX_FILE=.git/index git submodule summary --files --for-status
--summary-limit -1
00:08:20.106802 git.c:749               trace: exec: git-submodule
summary --files --for-status --summary-limit -1
00:08:20.107638 run-command.c:657       trace: run_command:
git-submodule summary --files --for-status --summary-limit -1
00:08:21.162243 trace.c:414             performance: 0.000006000 s:
git command: git --exec-path
00:08:22.496146 git.c:463               trace: built-in: git rev-parse --git-dir
00:08:22.497722 trace.c:414             performance: 0.001589000 s:
git command: git rev-parse --git-dir
00:08:22.764795 git.c:463               trace: built-in: git rev-parse
--git-path objects
00:08:22.766763 trace.c:414             performance: 0.001991000 s:
git command: git rev-parse --git-path objects
00:08:23.304626 git.c:463               trace: built-in: git rev-parse
--show-prefix
00:08:23.306436 trace.c:414             performance: 0.001833000 s:
git command: git rev-parse --show-prefix
00:08:23.575506 git.c:463               trace: built-in: git rev-parse
--show-toplevel
00:08:23.577138 trace.c:414             performance: 0.001656000 s:
git command: git rev-parse --show-toplevel
00:08:24.111335 trace.c:314             setup: git_dir: .git
00:08:24.112123 trace.c:315             setup: git_common_dir: .git
00:08:24.112138 trace.c:316             setup: worktree:
/Users/vijay/dev/oss/ferdium
00:08:24.112142 trace.c:317             setup: cwd: /Users/vijay/dev/oss/ferdium
00:08:24.112149 trace.c:318             setup: prefix: (null)
00:08:24.112154 git.c:463               trace: built-in: git
submodule--helper summary --files --for-status -n -1 --
00:08:24.113679 read-cache.c:2386       performance: 0.000216000 s:
read cache .git/index
00:08:24.117811 diff-lib.c:273          performance: 0.004115000 s:  diff-files
00:08:24.117838 trace.c:414             performance: 0.007389000 s:
git command: git submodule--helper summary --files --for-status -n -1
--
00:08:24.118895 trace.c:414             performance: 4.013083000 s:
git command: /opt/homebrew/opt/git/libexec/git-core/git submodule
summary --files --for-status --summary-limit -1
nothing to commit, working tree clean
00:08:24.119646 trace.c:414             performance: 8.571954000 s:
git command: git status

Hope this helps. Also, I noticed that the same repo, same versions of
all tools, etc - this issue only occurs on my M2 mac, but works
without any slowness on the intel mac.

On Sat, Feb 10, 2024 at 10:43 PM Sean Allred <allred.sean@xxxxxxxxx> wrote:
>
>
> Vijay Raghavan Aravamudhan <avijayr@xxxxxxxxx> writes:
>
> > What did you do before the bug happened? (Steps to reproduce your issue)
> > 1. brew update which pulled in latest version of git
> > 2. git status in a repository (without submodules)
> >
> > What did you expect to happen? (Expected behavior)
> > git status should have been fast
> >
> > What happened instead? (Actual behavior)
> > git status takes almost 5s to complete.
>
> Thanks for the report. This isn't a whole lot of information to go on.
> At least, I'm not able to reproduce locally with a trivial repository:
>
>     git init
>     echo foo > file
>     git add file
>     git commit -mtest
>     git status
>
> If you're able to reproduce, can you re-run `git status` with tracing
> enabled and provide your output?
>
>     GIT_TRACE=1 GIT_TRACE_SETUP=1 GIT_TRACE_PERFORMANCE=1 git status
>
> If you can provide reproduction instructions that start with `git init`,
> that would also help. It may take some time for you, but it'll take less
> time than folks on this list taking shots in the dark :-)
>
> --
> Sean Allred



-- 
You can visit my Github Profile to get to know what I work on outside
of my day job





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux