From: Junio C Hamano <gitster@pobox.com>
To: Jason Hatton <jhatton@globalfinishing.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git status extremely slow if any file is a multiple of 8GBi
Date: Wed, 04 May 2022 06:55:34 -0700 [thread overview]
Message-ID: <xmqqczgtpfl5.fsf@gitster.g> (raw)
In-Reply-To: CY4PR16MB1655A1F7DD8B2FABCC30C9DAAFC39@CY4PR16MB1655.namprd16.prod.outlook.com
Jason Hatton <jhatton@globalfinishing.com> writes:
> I have a proposed idea that may or may not help. Would it be possible for any
> file that is a multiple of 2^32 to be adjusted to a file size of 1 instead of
> zero? Git is already functioning with mangling file sizes over 4GB in the
> index, so maybe bumping up the size of 2^32 multiple files would mitigate the
> issue.
Clever.
The condition sd_size==0 is used as a signal for "no, we really need
to compare the contents", and causes the contents to be hashed, and
if the contents match the object name recorded in the index, the
on-disk size is stored in sd_size and the entry is marked as
CE_UPTODATE. Alas, if the truncated st_size is 0, the resulting
entry would have sd_size==0 again, so a workaround like what you
outlined is needed.
You'd need to make sure that you tweaked
if (sd->sd_size != (unsigned int) st->st_size)
changed |= DATA_CHANGED;
that appears at the end of read-cache.c::match_stat_data() in a way
that is consistent with how you munge the sd_size member in
fill_stat_data(), if you are going to go that route.
Thanks.
next prev parent reply other threads:[~2022-05-04 13:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 0:15 Git status extremely slow if any file is a multiple of 8GBi Jason Hatton
2022-05-04 13:55 ` Junio C Hamano [this message]
2022-05-04 16:08 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2022-05-04 17:47 Jason Hatton
2022-05-05 21:04 ` René Scharfe
2022-05-05 22:55 ` Philip Oakley
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=xmqqczgtpfl5.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jhatton@globalfinishing.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 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).