* Does git load index file into memory?
@ 2018-10-12 16:22 Farhan Khan
2018-10-14 9:59 ` Thomas Gummerer
0 siblings, 1 reply; 2+ messages in thread
From: Farhan Khan @ 2018-10-12 16:22 UTC (permalink / raw)
To: git
Hi all,
Does git load the entire index file into memory when it wants to
edit/view it? I ask because I wonder if this can become a problem with
the index file becomes arbitrarily large, like for the Linux kernel.
Thanks,
--
Farhan Khan
PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Does git load index file into memory?
2018-10-12 16:22 Does git load index file into memory? Farhan Khan
@ 2018-10-14 9:59 ` Thomas Gummerer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gummerer @ 2018-10-14 9:59 UTC (permalink / raw)
To: Farhan Khan; +Cc: git
On 10/12, Farhan Khan wrote:
> Hi all,
>
> Does git load the entire index file into memory when it wants to
> edit/view it? I ask because I wonder if this can become a problem with
> the index file becomes arbitrarily large, like for the Linux kernel.
Yes, currently git always loads the entire index file for any
operation on it. This is not particularly a problem for projects like
the linux kernel, as the index file for it is relatively small, ~6MB
at the moment.
It is more of a problem for larger repositories, such as the windows
repository, which has and index file of ~300-400MB, iirc, where
loading the index has a significant cost. There's some patch series
in progress to improve the performance, e.g. Ben Pearts series to load
the index in parallel [*1*].
For writing the index to disk again, the split index feature can help
improve performance. See also 'man git-update-index' and
"core.splitIndex" in 'man git-config'.
[*1*]: https://public-inbox.org/git/20181010155938.20996-1-peartben@gmail.com/
> Thanks,
> --
> Farhan Khan
> PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-14 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 16:22 Does git load index file into memory? Farhan Khan
2018-10-14 9:59 ` Thomas Gummerer
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).