From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Roman Sandu <r.sandu@gaijin.team>, git@vger.kernel.org
Subject: Re: Committing crimes with NTFS-3G
Date: Fri, 30 Aug 2024 09:28:17 -0700 [thread overview]
Message-ID: <xmqq1q26t1pa.fsf@gitster.g> (raw)
In-Reply-To: <b282c83c-2fa2-4e8e-b8bf-d42f28c17439@kdbg.org> (Johannes Sixt's message of "Fri, 30 Aug 2024 06:58:20 +0200")
Johannes Sixt <j6t@kdbg.org> writes:
> Am 29.08.24 um 22:43 schrieb Roman Sandu:
>> To diagnose the problem, I ran git status with GIT_TRACE_PERFORMANCE
>> enabled, and what I see is that the "refresh index" region is taking up
>> 99% of the time.
>
> Of course. The stat information that Git on Linux caches in the index is
> vastly different from that that Git for Windows caches. So every time
> you switch OS, all files appear modified to Git.
>
> I suggest that you don't switch OS on a whim and take the 8 seconds
> delay once when you have to.
I somehow got an impression that the hit is not just that we need to
adjust cached lstat information in the index file once to the new
filesystem implementation after an OS switch, but every time (as if
we are forced to be extra careful and rehash every time until the
things improve, somewhat like how we handle the racy-Git situation).
Timestamps given by these OSes are not consistent and the clock
appears to have rewound, or something?
Timestamps of files in the working tree ordinarily should match
timestamps in the cached lstat information of these paths in the
index, and timestamp of the index file itself should be newer than
any of the above, or the recy-Git prevention code may tell us to
play safe.
I do not do Windows and/or NTFS, but I have to wonder if the smudge
filters (including the EOL conversion) play a role in this situation
as the working tree is getting switched between LF-native and
CRLF-native systems. May there be situations where the system must
spend time only to realize that there is nothing it needs to do to
canonicalize the file contents and there is no modifications between
the HEAD commit, the index, and the working tree files, or something
silly like that?
Thanks.
next prev parent reply other threads:[~2024-08-30 16:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 20:43 Committing crimes with NTFS-3G Roman Sandu
2024-08-30 0:47 ` brian m. carlson
2024-08-30 12:52 ` Roman Sandu
2024-08-30 15:02 ` brian m. carlson
2024-08-30 19:25 ` Roman Sandu
2024-08-30 15:55 ` brian m. carlson
2024-08-30 22:00 ` Roman Sandu
2024-08-30 4:18 ` Vito Caputo
2024-08-30 4:58 ` Johannes Sixt
2024-08-30 12:41 ` Roman Sandu
2024-08-30 16:28 ` Junio C Hamano [this message]
2024-09-03 15:58 ` Torsten Bögershausen
2024-09-03 17:30 ` Roman Sandu
2024-09-05 19:51 ` Torsten Bögershausen
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=xmqq1q26t1pa.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=r.sandu@gaijin.team \
/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).