Re: [PATCH] name-rev: Fix non-shortest description

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Tuesday, August 28, 2007 - 2:25 am

On Tue, Aug 28, 2007 at 10:15:01AM +0100, Johannes Schindelin wrote:


Yes, I considered making it dynamic, which would probably end up saving
quite a bit of memory (since most commits use many fewer than 32) I
think 32 is a reasonable limit in general, since at some point, do you
really want to see that many merge traversals in the resulting name?


Let's say we allocate dynamically. The average per-commit number of
stored merge traversals for linux-2.6 is 1.79. Each traversal is 5 bytes
(though I think we could easily drop it to 3 or 4 -- do we expect
generation counters larger 1.7 million?), for an average of 10 bytes
stored per commit.

Now compare that to the fact that we no longer need to strdup the
tip_name. "tags/v2.6.22-rc1~1686^2~1" is _25_ bytes. So it's a net win
(though not with a static array, obviously).


I am all for making a trade-off if there is a reason. But if memory
usage is your only concern, I think we can have our cake and eat it too.

-Peff
-
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:
name-rev does not show the shortest path, Uwe , (Thu Aug 23, 3:38 am)
Re: name-rev does not show the shortest path, Julian Phillips, (Fri Aug 24, 4:55 am)
Re: name-rev does not show the shortest path, Julian Phillips, (Fri Aug 24, 8:21 am)
Re: name-rev does not show the shortest path, Junio C Hamano, (Fri Aug 24, 11:33 am)
Re: name-rev does not show the shortest path, Johannes Schindelin, (Sat Aug 25, 8:04 am)
Re: name-rev does not show the shortest path, Jeff King, (Sun Aug 26, 2:23 am)
Re: name-rev does not show the shortest path, Johannes Schindelin, (Sun Aug 26, 8:38 am)
Re: name-rev does not show the shortest path, Jeff King, (Mon Aug 27, 2:24 am)
Re: name-rev does not show the shortest path, Johannes Schindelin, (Mon Aug 27, 2:57 am)
Re: name-rev does not show the shortest path, Johannes Schindelin, (Mon Aug 27, 4:18 am)
[PATCH] name-rev: Fix non-shortest description, Johannes Schindelin, (Mon Aug 27, 4:37 am)
Re: [PATCH] name-rev: Fix non-shortest description, Jeff King, (Tue Aug 28, 1:20 am)
Re: [PATCH] name-rev: Fix non-shortest description, Johannes Schindelin, (Tue Aug 28, 1:39 am)
Re: [PATCH] name-rev: Fix non-shortest description, Jeff King, (Tue Aug 28, 2:00 am)
Re: [PATCH] name-rev: Fix non-shortest description, Johannes Schindelin, (Tue Aug 28, 2:15 am)
Re: [PATCH] name-rev: Fix non-shortest description, Jeff King, (Tue Aug 28, 2:25 am)
Re: [PATCH] name-rev: Fix non-shortest description, Jeff King, (Tue Aug 28, 2:26 am)
Re: [PATCH] name-rev: Fix non-shortest description, Johannes Schindelin, (Tue Aug 28, 3:03 am)
Re: [PATCH] name-rev: Fix non-shortest description, Jeff King, (Tue Aug 28, 3:26 am)
Re: [PATCH] name-rev: Fix non-shortest description, Johannes Schindelin, (Tue Aug 28, 4:02 am)
Re: [PATCH] name-rev: Fix non-shortest description, Jeff King, (Tue Aug 28, 4:11 am)
Re: [PATCH] name-rev: Fix non-shortest description, Johannes Schindelin, (Tue Aug 28, 4:28 am)
Re: [PATCH] name-rev: Fix non-shortest description, Jeff King, (Tue Aug 28, 4:34 am)