Re: [RFC PATCH 1/4] name-rev: improve name_rev() memory usage

2019-03-02 Thread Johannes Schindelin
Hi Alban, On Fri, 1 Mar 2019, Alban Gruin wrote: > name_rev() is a recursive function. For each commit, it allocates the > name of its parents, and call itself. A parent may not use a name for > multiple reasons, but in any case, the name will not be released. On a > repository with a lot of b

Re: [RFC PATCH 1/4] name-rev: improve name_rev() memory usage

2019-03-01 Thread Jeff King
On Fri, Mar 01, 2019 at 06:50:21PM +0100, Alban Gruin wrote: > name_rev() is a recursive function. For each commit, it allocates the > name of its parents, and call itself. A parent may not use a name for > multiple reasons, but in any case, the name will not be released. On a > repository with

Re: [RFC PATCH 1/4] name-rev: improve name_rev() memory usage

2019-03-01 Thread Eric Sunshine
On Fri, Mar 1, 2019 at 12:50 PM Alban Gruin wrote: > There a condition that will always be false here when name_rev() calls > itself for the first parent, but it will become useful when name_rev() > will stop to name commits that are not mentionned in the stdin buffer. s/mentionned/mentioned/ >

[RFC PATCH 1/4] name-rev: improve name_rev() memory usage

2019-03-01 Thread Alban Gruin
name_rev() is a recursive function. For each commit, it allocates the name of its parents, and call itself. A parent may not use a name for multiple reasons, but in any case, the name will not be released. On a repository with a lot of branches, tags, remotes, and commits, it can use more than 2