git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] rename: warn user when we have turned off rename detection

From
Jeff King <peff@peff.net>
Date
Mar 1, 2008, 08:18 UTC
Message-ID
<20080301081832.GB31855@coredump.intra.peff.net>
In-Reply-To
<7vtzjq6gnv.fsf@gitster.siamese.dyndns.org>
On Fri, Feb 29, 2008 at 11:35:00PM -0800, Junio C Hamano wrote:
Show 12 quoted lines
> > +	if ((num_create > rename_limit && num_src > rename_limit) ||
> > +	    (num_create * num_src > rename_limit * rename_limit)) {
> > +		warning("too many files, skipping inexact rename detection");
> >  		goto cleanup;
> > +	}
> > 
> >  	mx = xmalloc(sizeof(*mx) * num_create * num_src);
> >  	for (dst_cnt = i = 0; i < rename_dst_nr; i++) {
> 
> This reminds me of the 6d24ad9 (Optimize rename detection for a huge diff)
> topic that reduces the above allocation greatly.  Some benching with the
> patch may prove useful to establish much higher limits, I suspect.

Actually, my timings are about the same. While the patch you mentioned is nice for reducing the memory consumption, we still have an O(n^2) loop.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “rename: warn user when we have turned off rename detection”
  1. rename: warn user when we have turned off rename detectionJeff King, Mar 1, 2008
  2. Junio C HamanoMar 1, 2008
  3. Jeff KingMar 1, 2008
  4. Junio C HamanoMar 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.