From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Christopher Jefferson <caj@cs.st-andrews.ac.uk>, git@vger.kernel.org
Subject: Re: Problem with large files on different OSes
Date: Wed, 27 May 2009 09:59:21 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.01.0905270942580.3435@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.01.0905270922250.3435@localhost.localdomain>
On Wed, 27 May 2009, Linus Torvalds wrote:
>
> I'll see if I can make us handle the "big file without diff" case better
> by chunking.
Hmm. No. Looking at it some more, we could add some nasty code to do
_some_ things chunked (like adding a new file as a single object), but it
doesn't really help. For any kind of useful thing, we'd need to handle the
"read from pack" case in multiple chunks too, and that gets really nasty
really quickly.
The whole "each object as one allocation" design is pretty core, and it
looks pointless to have a few special cases, when any actual relevant use
would need a whole lot more than the few simple ones.
Git really doesn't like big individual objects.
I've occasionally thought about handling big files as multiple big
objects: we'd split them into a "pseudo-directory" (it would have some new
object ID), and then treat them as a magical special kind of directory
that just happens to be represented as one large file on the filesystem.
That would mean that if you have a huge file, git internally would never
think of it as one big file, but as a collection of many smaller objects.
By just making the point where you break up files be a consistent rule
("always break into 256MB pieces"), it would be a well-behaved design (ie
things like behaviour convergence wrt the same big file being created
different ways).
HOWEVER.
While that would fit in the git design (ie it would be just a fairly
straightforward extension - another level of indirection, kind of the way
we added subprojects), it would still be a rewrite of some core stuff. The
actual number of lines might not be too horrid, but quite frankly, I
wouldn't want to do it personally. It would be a lot of work with lots of
careful special case handling - and no real upside for normal use.
So I'm kind of down on it. I would suggest just admitting that git isn't
very good at big individual files - especially not if you have a limited
address space.
So "don't do it then" or "make sure you are 64-bit and have lots of
memory if you do it" may well be the right solution.
[ And it's really really sad how Apple migrated to x86-32. It was totally
unforgivably stupid, and I said so at the time. When Apple did the
PowerPC -> x86 transition, they should have just transitioned to x86-64,
and never had a 32-bit space.
But Apple does stupid things, that seem to be driven by marketing rather
than thinking deeply about the technology, and now they basically _have_
to default to that 32-bit environment. ]
Oh well.
Linus
next prev parent reply other threads:[~2009-05-27 16:59 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 10:52 Problem with large files on different OSes Christopher Jefferson
2009-05-27 11:37 ` Andreas Ericsson
2009-05-27 13:02 ` Christopher Jefferson
2009-05-27 13:28 ` John Tapsell
2009-05-27 13:30 ` Christopher Jefferson
2009-05-27 13:32 ` John Tapsell
2009-05-27 14:01 ` Tomas Carnecky
2009-05-27 14:09 ` Christopher Jefferson
2009-05-27 14:22 ` Andreas Ericsson
2009-05-27 14:37 ` Jakub Narebski
2009-05-27 16:30 ` Linus Torvalds
2009-05-27 16:59 ` Linus Torvalds [this message]
2009-05-27 17:22 ` Christopher Jefferson
2009-05-27 17:30 ` Jakub Narebski
2009-05-27 17:37 ` Nicolas Pitre
2009-05-27 21:53 ` Jeff King
2009-05-27 22:07 ` Linus Torvalds
2009-05-27 23:09 ` Alan Manuel Gloria
2009-05-28 1:56 ` Linus Torvalds
2009-05-28 3:26 ` Nicolas Pitre
2009-05-28 4:21 ` Eric Raible
2009-05-28 4:30 ` Shawn O. Pearce
2009-05-28 5:52 ` Eric Raible
2009-05-28 8:52 ` Andreas Ericsson
2009-05-28 17:41 ` Nicolas Pitre
2009-05-28 19:43 ` Jeff King
2009-05-28 19:49 ` Linus Torvalds
2009-05-27 23:29 ` Nicolas Pitre
2009-05-28 20:00 ` Jeff King
2009-05-28 20:54 ` Nicolas Pitre
2009-05-28 21:21 ` Jeff King
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=alpine.LFD.2.01.0905270942580.3435@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=caj@cs.st-andrews.ac.uk \
--cc=git@vger.kernel.org \
--cc=jnareb@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox