git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Re: Commit cache to speed up rev-list and merge
@ 2012-09-27 15:51 Shawn Pearce
  2012-09-27 17:39 ` Jeff King
  2012-09-28  2:14 ` Nguyen Thai Ngoc Duy
  0 siblings, 2 replies; 10+ messages in thread
From: Shawn Pearce @ 2012-09-27 15:51 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: git, Colby Ranger

On Thu, Sep 27, 2012 at 5:17 AM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> I'd like to see some sort of extension mechanism like in
> $GIT_DIR/index, so that we don't have to increase pack index version
> often. What I have in mind is optional commit cache to speed up
> rev-list and merge, which could be stored in pack index too.

Can you share some of your ideas?

In Linus' Linux kernel tree there are currently about 323,178 commits.
If we store just the pre-parsed commit time as an int32 field this is
an additional 1.2 MiB of data in the pack-*.idx file, assuming we can
use additional data like pack offset position to correlate commit to
the parsed int. If we stored parent pointers in a similar way you
probably need at least 3.6 MiB of additional disk space on the index.
For example, use 12 bytes for each commit to store enough of the
parsed commit time to sort commits, and up to 2 parent pointers per
commit.... with a reserved magic value for octopus merges to mean the
commit itself has to be parsed to get the graph structure correct.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-10-01  5:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-27 15:51 Commit cache to speed up rev-list and merge Shawn Pearce
2012-09-27 17:39 ` Jeff King
2012-09-27 17:45   ` Shawn Pearce
2012-09-27 18:32     ` Jeff King
2012-09-28  1:43   ` Nguyen Thai Ngoc Duy
2012-09-28  2:14 ` Nguyen Thai Ngoc Duy
2012-10-01  1:49   ` Shawn Pearce
2012-10-01  2:05     ` Nguyen Thai Ngoc Duy
2012-10-01  2:27       ` Shawn Pearce
2012-10-01  5:16         ` Nguyen Thai Ngoc Duy

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).