git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Re: git-add has gone lstat() mad
Date: Fri, 30 Mar 2007 21:20:22 +0100	[thread overview]
Message-ID: <200703302120.23713.andyparkins@gmail.com> (raw)
In-Reply-To: <200703302055.13619.andyparkins@gmail.com>

On Friday 2007, March 30, Andy Parkins wrote:

> At this point the CPU pegs at 100% systime.  An strace shows that git
> is calling lstat64() on every file in my home directory.  I killed
> git before it scanned everything I've ever done.

Okay.  I've tracked down the culprit function, but I have no idea what 
the fix is.

builtin-add.c:fill_directory() calls
dir.c:read_directory() which calls
dir.c:read_directory_recursive()

I can't see why git feels that it has to recurse the entire subtree.  It 
seems to be something to do with the gitignore stuff.  Surely there is 
no need to use a recursive search when no directories are being added?

If git-add were given

 file1
 dir1/file2
 dir2/dir3/file3

Then only the directories "."; "dir1/"; "dir2"; and "dir2/dir3" need 
checking for .gitignore files; and in none of those cases does the 
search need to be recursive.



Andy

-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

  reply	other threads:[~2007-03-30 20:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-30 19:55 git-add has gone lstat() mad Andy Parkins
2007-03-30 20:20 ` Andy Parkins [this message]
2007-03-31  1:38   ` Junio C Hamano
2007-03-31  3:39     ` Linus Torvalds
2007-03-31 10:18       ` Andy Parkins
2007-03-31 14:54         ` Randal L. Schwartz
2007-03-31 15:09           ` Andy Parkins
2007-03-31 19:28           ` Tom Prince
2007-04-01  0:39       ` Junio C Hamano
2007-04-01  8:25         ` Andy Parkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200703302120.23713.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).