All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: "Saravanan Shanmugham (sarvi)" <sarvi@cisco.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: First Git status takes 40+ minutes, when mounting fileystem/diskimage with 50G GIT repo + 900G of builds articles
Date: Thu, 22 Aug 2019 21:15:54 +0200	[thread overview]
Message-ID: <b409d16f-c392-7f1f-79a0-e14e70148cad@kdbg.org> (raw)
In-Reply-To: <2303C0BB-C532-4560-8BCA-A05DAD97EB72@cisco.com>

Am 22.08.19 um 20:02 schrieb Saravanan Shanmugham (sarvi):
> We have a diskimage/fileysystem that has a 50G Git repository + 900G
> of binary/build articles and untracked files. When we mount such a
> diskimage, The verify first “git status” command can take as long
> 40-50minutes. Subsequent “git status” finish in under 5-10 seconds.>
> If I had a diskimage of just the 50G source repository, and I mount
> and do a “git status” takes around 15 seconds.
Are you saying that you commonly mount and unmount the filesystem?

Git tracks a device number in the index. Could it happen that it is
different every time you mount the filesystem? Because when it is, Git
reads the data and checks whether it has changed. At this time, the
device number is also fixed up in the index. Thereafter, "git status" is
fast because it sees from the cached file properties that no change was
made and does not have to read the data.

You may set "git config core.checkStat minimal" to avoid the problem.
But it may come with its own problems (certain kinds of modifications
would not be noticed, although these would be hard to trigger in practice).

-- Hannes

  parent reply	other threads:[~2019-08-22 19:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 18:02 First Git status takes 40+ minutes, when mounting fileystem/diskimage with 50G GIT repo + 900G of builds articles Saravanan Shanmugham (sarvi)
2019-08-22 18:13 ` Junio C Hamano
2019-08-23  0:32   ` Saravanan Shanmugham (sarvi)
2019-08-22 19:15 ` Johannes Sixt [this message]
2019-08-22 19:32   ` Junio C Hamano
2019-08-22 21:29     ` Johannes Sixt
2019-08-22 21:36       ` Junio C Hamano

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=b409d16f-c392-7f1f-79a0-e14e70148cad@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=sarvi@cisco.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.