git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: many files, simple history

From
ATAli Tofigh <alix.tofigh@gmail.com>
Date
May 14, 2010, 16:18 UTC
Message-ID
<AANLkTimwd0DMc2gMbQfv9t_4YeEZrJETz2trszVqq3jd@mail.gmail.com>
In-Reply-To
<20100514040559.GB6075@coredump.intra.peff.net>
On Fri, May 14, 2010 at 00:05, Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
> On Thu, May 13, 2010 at 10:57:22PM -0400, Ali Tofigh wrote:
>
>> short version: will git handle large number of files efficiently if
>> the history is simple and linear, i.e., without merges?
>
> Short answer: large number of files, yes, large files, not really. The
> shape of history is largely irrelevant.

thank you for the explanation. I will start using git for managing my installed programs and will try to report back to this list about my experience.

/ali
Show 32 quoted lines
>
> Longer answer:
>
> Git separates the conceptual structure of history (the digraph of
> commits, and the pointers of commits to trees to blobs) from the actual
> storage of objects representing that history. Problems with large files
> are usually storage issues. Copying them around in packfiles is
> expensive, storing an extra copy in the repo is expensive, trying deltas
> and diffs is expensive. None of those things has to do with the shape of
> your history. So I would expect git to handle such a load with a linear
> history about as well as a complex history with merges.
>
> For large numbers of files, git generally does a good job, especially if
> those files are distributed throughout a directory hierarchy. But keep
> in mind that the git repo will store another copy of every file. They
> will be delta-compressed between versions, and zlib compressed overall,
> but you may potentially be doubling the amount of disk space required if
> you have a lot of uncompressible binary files.
>
> For large files, git expects to be able to pull each file into memory.
> Sometimes two versions if you are doing a diff. And it will copy those
> files around when repacking (which you will want to do for the sake of
> the smaller files). So files on the order of a few megabytes are not a
> problem. If you have files in the hundreds of megabytes or gigabytes,
> expect some operations to be slow (like repacking).
>
> Really, I would start by just "git add"-ing your whole filesystem, doing
> a "git repack -ad", and seeing how long it takes, and what the resulting
> size is.
>
> -Peff
>
Previous: Jeff King
Message 5 of 5 in “many files, simple history”
  1. Ali TofighMay 14, 2010
  2. Michael WittenMay 14, 2010
  3. Ali TofighMay 14, 2010
  4. Jeff KingMay 14, 2010
  5. Ali TofighMay 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.