From: "Shawn O. Pearce" <spearce@spearce.org>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] commit-tree: bump MAX_PARENTS to 128
Date: Mon, 26 Feb 2007 09:31:42 -0500 [thread overview]
Message-ID: <20070226143142.GA1390@spearce.org> (raw)
In-Reply-To: <20070226121557.GA18114@coredump.intra.peff.net>
Jeff King <peff@peff.net> wrote:
> This limit doesn't seem to come into effect anywhere else; it's simply
> an arbitrary limit to make memory allocation easier. It's used to
> declare a single static array of 20-byte hashes, so this increase wastes
> about 2K.
I don't really see a problem with this, however:
The pack v4 code that Nico and I are working on was planning on
taking a very useful optimization for any commit with less than 64
parents (or maybe 128, I'd have to go back to look at my notes).
We would fall back to a less optimal storage for these large
octopus commits. Of course the fallback strategy (which is really
just the current OBJ_COMMIT packing) is still more space efficient
than making multiple commits to express the octopus, so pushing
this limit up higher would save space better. Oh, and these types
of octopus merges aren't very frequent either. ;-)
git-bisect can bisect these large octopuses, but it needs to search
every parent commit in the merge. It cannot perform a binary search
through them. Getting massive octopuses makes it harder for the
user to bisect.
I'm thinking maybe this should just change to a dynamic allocation
and let the caller feed however many parents they want. Most people
don't make an octopus very often, and when they do they really mean
to do it, such as the case you just described.
Unless Dscho/Nico/Junio/Linus/etc. know of some other limitation
lurking within Git. My recollection is that only git-commit-tree
and git-gui knew about this 16 parent limit. And the latter only
knows about the limit so that can prevent the user from doing an
octopus merge that overflowed git-commit-tree's limit. Be nice if
git-gui has no limit. ;-)
--
Shawn.
next prev parent reply other threads:[~2007-02-26 14:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-26 12:15 [RFC/PATCH] commit-tree: bump MAX_PARENTS to 128 Jeff King
2007-02-26 14:31 ` Shawn O. Pearce [this message]
2007-02-26 16:38 ` Johannes Schindelin
2007-02-27 8:16 ` Junio C Hamano
2007-02-27 8:19 ` Jeff King
2007-02-27 10:23 ` Junio C Hamano
2007-02-27 10:52 ` Jeff King
2007-02-27 11:06 ` Junio C Hamano
2007-02-27 11:31 ` Andy Parkins
2007-02-27 11:39 ` Jeff King
2007-02-27 14:04 ` Jakub Narebski
2007-02-27 15:46 ` Johannes Schindelin
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=20070226143142.GA1390@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).