git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: diffcore-rename performance mode
Date: Tue, 18 Sep 2007 15:12:48 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.999.0709181510460.16478@woody.linux-foundation.org> (raw)
In-Reply-To: <20070918082321.GA9883@coredump.intra.peff.net>



On Tue, 18 Sep 2007, Jeff King wrote:
> 
> With this patch:
> 
> diff --git a/diffcore-rename.c b/diffcore-rename.c
> index 6bde439..531a844 100644
> --- a/diffcore-rename.c
> +++ b/diffcore-rename.c
> @@ -362,10 +362,7 @@ void diffcore_rename(struct diff_options *options)
>  			m->score = estimate_similarity(one, two,
>  						       minimum_score);
>  			m->name_score = basename_same(one, two);
> -			diff_free_filespec_data(one);
>  		}
> -		/* We do not need the text anymore */
> -		diff_free_filespec_data(two);
>  		dst_cnt++;
>  	}
>  	/* cost matrix sorted by most to least similar pair */
> 
> My 20-minute diff becomes a 2-minute diff.

I think this is a reasonable patch, but only now *after* we limit the 
rename matrix.

The whole reason for freeing the filespec data was to avoid exploding the 
memory usage, but now that we aggressively limit the number of renames in 
flight anyway, I think we can probably remove the code that frees the file 
data in between all the rename similarity analysis.

			Linus

      parent reply	other threads:[~2007-09-18 22:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18  8:23 diffcore-rename performance mode Jeff King
2007-09-18  8:49 ` Junio C Hamano
2007-09-18  8:54   ` Jeff King
2007-09-18  8:58     ` Junio C Hamano
2007-09-18  9:01       ` Jeff King
2007-09-18  9:17         ` Junio C Hamano
2007-09-18 11:20     ` Johannes Schindelin
2007-09-25 16:38     ` Jeff King
2007-09-25 19:06       ` Jeff King
2007-09-25 19:10         ` Andreas Ericsson
2007-09-25 19:32         ` David Kastrup
2007-09-25 19:52           ` Jeff King
2007-09-18 22:12 ` Linus Torvalds [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.0.999.0709181510460.16478@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).