Re: Calculating tree nodes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Jon Smirl <jonsmirl@...>, Git Mailing List <git@...>
Date: Wednesday, September 5, 2007 - 11:20 pm

Junio C Hamano <gitster@pobox.com> wrote:
...
...

I'm inclined to agree.

Its something I've thought about doing.  I haven't even prototyped
code for it.  Let alone shown numbers that say one way or the other.

One of the notes proposals was talking about having lots of different
classes of notes.  E.g. a "Signed-off-by" class and a "build and test
log results" class.

The former would generally be very small and may even want to be
shown most of the time the commit body is displayed (e.g. in gitk,
git-log).  These would be good candidates to cluster alongside the
commit.  Indeed they are clustered there today, just hung inside
of the commit object itself.  Nobody is bitching about the hit they
cause on the common case of `pack-objects`.  :)

The latter (build and test log) would generally be very large.
We would *not* want to cluster them.  But we might want to store
next to the commit a very small pointer to the note itself.  Such
as the note's SHA-1.  Or its offset within the packfile's index.
This would make locating those notes very cheap, while not having
a huge impact on the common case of commit traversal.

Likewise we might want to pack a tag's SHA-1 alongside of the commit
it points at, as parsing the commit would immediately give us all
annotated tags that refer to that commit.  Tags are (usually) few
and far between.  But tools like git-describe are commonly used and
would benefit from not needing to build the commit->tag hashtable.
OK, well, git-describe cheats and uses the struct object hashtable,
but whatever.

You get my point.  I think.  And I got yours about not making the
common case worse than it already is today.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Calculating tree nodes, Jon Smirl, (Mon Sep 3, 10:13 pm)
Re: Calculating tree nodes, Shawn O. Pearce, (Mon Sep 3, 10:51 pm)
Re: Calculating tree nodes, Jon Smirl, (Mon Sep 3, 11:26 pm)
Re: Calculating tree nodes, Daniel Hulme, (Tue Sep 4, 12:20 pm)
Re: Calculating tree nodes, Shawn O. Pearce, (Tue Sep 4, 2:26 am)
Re: Calculating tree nodes, Junio C Hamano, (Tue Sep 4, 1:39 pm)
Re: Calculating tree nodes, Shawn O. Pearce, (Wed Sep 5, 11:20 pm)
Re: Calculating tree nodes, Junio C Hamano, (Thu Sep 6, 1:21 am)
Re: Calculating tree nodes, David Tweed, (Tue Sep 4, 12:19 am)
Re: Calculating tree nodes, Jon Smirl, (Tue Sep 4, 1:52 am)
Re: Calculating tree nodes, David Tweed, (Tue Sep 4, 2:16 am)
Re: Calculating tree nodes, Andreas Ericsson, (Tue Sep 4, 1:55 am)
Re: Calculating tree nodes, Shawn O. Pearce, (Tue Sep 4, 2:16 am)
Re: Calculating tree nodes, Jon Smirl, (Tue Sep 4, 10:19 am)
Re: Calculating tree nodes, Andreas Ericsson, (Tue Sep 4, 10:41 am)
Re: Calculating tree nodes, Johannes Schindelin, (Mon Sep 3, 11:40 pm)
Re: Calculating tree nodes, Jon Smirl, (Mon Sep 3, 11:54 pm)
Re: Calculating tree nodes, Junio C Hamano, (Tue Sep 4, 12:28 am)
Re: Calculating tree nodes, Jon Smirl, (Tue Sep 4, 1:50 am)
Re: Calculating tree nodes, Martin Langhoff, (Tue Sep 4, 12:21 am)
Re: Calculating tree nodes, Jon Smirl, (Tue Sep 4, 1:37 am)
Re: Calculating tree nodes, Johannes Schindelin, (Tue Sep 4, 6:33 am)
Re: Calculating tree nodes, Jon Smirl, (Tue Sep 4, 10:31 am)
Re: Calculating tree nodes, Andreas Ericsson, (Tue Sep 4, 11:14 am)
Re: Calculating tree nodes, Martin Langhoff, (Tue Sep 4, 5:02 pm)
Re: Calculating tree nodes, Johannes Schindelin, (Tue Sep 4, 11:05 am)
Re: Calculating tree nodes, Andreas Ericsson, (Tue Sep 4, 1:51 am)