git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git status --ignored hangs when a deep directory structure present in working tree

From
Elijah Newren <newren@gmail.com>
Date
Jan 28, 2020, 15:00 UTC
Message-ID
<CABPp-BG44ni2jeaFo8p9w7tfmbeFRS=jdVheTM8f1zdv=Txxjg@mail.gmail.com>
In-Reply-To
<20200128135707.GD10482@szeder.dev>
On Tue, Jan 28, 2020 at 5:57 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:
Show 28 quoted lines
>
> On Mon, Jan 27, 2020 at 09:06:01PM -0800, Elijah Newren wrote:
> > > the runtime of 'git status
> > > --ignored' grows quickly with the depth of the untracked directory.
> > > Running this shell loop produces the numbers below:
> > >
> > > for depth in $(seq 10 30)
> > > do
> > >         dirs=$(for i in $(seq 1 $depth) ; do printf 'dir/' ; done)
> > >         rm -rf dir
> > >         mkdir -p $dirs
> > >         >$dirs/untracked-file
> > >         /usr/bin/time --format="$depth: %e" git status --ignored >/dev/null
> > > done
> > >
> > > 10: 0.01
> > > 11: 0.03
> > > 12: 0.05
> > > 13: 0.11
> > > 14: 0.23
> > > 15: 0.47
> > > 16: 0.97
> > > 17: 1.97
> > > 18: 3.88
> > > 19: 7.85
> > > 20: 16.29
> > > 21: 32.92
> > > 22: 76.24
[...]
Show 9 quoted lines
> > > Unless I messed up my numbers, with a depth of 120 directories it
> > > would take over 6*10^23 years to complete... so yeah, it does qualify
> > > as indefinitely.
> >
> > No comment about how people today are spoiled and addicted to instant
> > gratification?  I mean, can't folks just be a little patient?  ;-)
>
> Nope.  Notice how my shell loop above goes to 30, but the results only
> to 22 :)

I was specifically referring to your 6*10^23 years estimate when I was jokingly suggesting just a little more patience. :-)

Previous: SZEDER GáborNext: Elijah Newren
Message 5 of 6 in “git status --ignored hangs when a deep directory structure present in working tree”
  1. Martin MelkaJan 27, 2020
  2. SZEDER GáborJan 27, 2020
  3. Elijah NewrenJan 28, 2020
  4. SZEDER GáborJan 28, 2020
  5. Elijah NewrenJan 28, 2020
  6. Elijah NewrenJan 29, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.