From: Thomas Gummerer <t.gummerer@gmail.com>
To: Farhan Khan <khanzf@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Does git load index file into memory?
Date: Sun, 14 Oct 2018 10:59:49 +0100 [thread overview]
Message-ID: <20181014095949.GB22611@hank.intra.tgummerer.com> (raw)
In-Reply-To: <CAFd4kYCTuLMZ6UDk49MASbZfhwjgUcmfeyd6jZS5QO9-LnzLCw@mail.gmail.com>
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
prev parent reply other threads:[~2018-10-14 9:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 16:22 Does git load index file into memory? Farhan Khan
2018-10-14 9:59 ` Thomas Gummerer [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181014095949.GB22611@hank.intra.tgummerer.com \
--to=t.gummerer@gmail.com \
--cc=git@vger.kernel.org \
--cc=khanzf@gmail.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.
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).