Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Yann Dirson <ydirson@altern.org>
Cc: Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 1/2] diffcore-rename: support rename cache
Date: Sat, 8 Nov 2008 06:47:20 -0500	[thread overview]
Message-ID: <20081108114719.GA4989@sigill.intra.peff.net> (raw)
In-Reply-To: <20081108092409.GD4030@nan92-1-81-57-214-146.fbx.proxad.net>

On Sat, Nov 08, 2008 at 10:24:10AM +0100, Yann Dirson wrote:

> Well, it could be that an out-of-pathspec pair would have a better
> score than an in-pathspec one.  Maybe cache recording should be turned
> off when doing pathspec limitation ?

One thing I notice is that the cache works at the level of "here is the
best rename for this commit." Maybe it could go down a level and say
"here is the inexact rename score between these blobs". Then you would
still find the best score between two blobs each time, but save the
really computationally intensive part (which is comparing the actual
_content_ of the blobs).

That should work in the face of path limiting or any other option,
because it is caching something immutable: this is the similarity score
between two pieces of content. And then you get arbitrary tree-to-tree
speedups for free, since such a cache would be valid for every commit.

The downsides are:

 - your cache is potentially bigger, since you are caching the score of
   every pair you look at, instead of just "good" pairs (OTOH, you are
   not doing a per-commit cache, which helps reduce the size)

 - you can still "lie" about a score to pre-seed imported SVN renames,
   but such lying will actually apply to all commits.

-Peff

  parent reply	other threads:[~2008-11-08 11:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 14:35 [PATCH 1/2] diffcore-rename: support rename cache Nguyễn Thái Ngọc Duy
2008-11-07 14:35 ` [PATCH 2/2] diffcore-rename: add config option to allow to cache renames Nguyễn Thái Ngọc Duy
2008-11-07 22:21 ` [PATCH 1/2] diffcore-rename: support rename cache Yann Dirson
2008-11-07 23:17   ` Junio C Hamano
2008-11-08  4:01     ` Nguyen Thai Ngoc Duy
2008-11-08  9:24       ` Yann Dirson
2008-11-08  9:29         ` Nguyen Thai Ngoc Duy
2008-11-08 11:47         ` Jeff King [this message]
2008-11-08 12:00           ` Nguyen Thai Ngoc Duy
2008-11-09  2:04             ` Jeff King

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

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

  git send-email \
    --in-reply-to=20081108114719.GA4989@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=ydirson@altern.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox