git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH 1/1] Bypass expensive content comparsion during rename detection.
Date: Thu, 14 Dec 2006 11:53:08 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.63.0612141151220.3635@wbgn013.biozentrum.uni-wuerzburg.de> (raw)
In-Reply-To: <20061214100746.GA31191@spearce.org>

Hi,

On Thu, 14 Dec 2006, Shawn O. Pearce wrote:

> When comparing file contents during the second loop through a rename 
> detection attempt we can skip the expensive byte-by-byte comparsion if 
> both source and destination files have valid SHA1 values.  This improves 
> performance by avoiding either an expensive open/mmap to read the 
> working tree copy, or an expensive inflate of a blob object.
> 
> Unfortunately we still have to at least initialize the sizes of the 
> source and destination files even if the SHA1 values don't match. 
> Failing to initialize the sizes causes a number of test cases to fail 
> and start reporting different copy/rename behavior than was expected.

It has a wrong feel to it when you say we have to check the sizes first. 
After all, we are heavily relying on the hashes being different, including 
the case when the sizes are different. So, the order of the checks should 
_not_ matter. I suspect that somewhere sha1_valid should be set to 0, but 
isn't.

Ciao,

  reply	other threads:[~2006-12-14 10:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14 10:07 [PATCH 1/1] Bypass expensive content comparsion during rename detection Shawn O. Pearce
2006-12-14 10:53 ` Johannes Schindelin [this message]
2006-12-14 11:08   ` Shawn Pearce
2006-12-14 11:13     ` Shawn Pearce
2006-12-14 11:18     ` Johannes Schindelin
2006-12-14 11:50       ` Shawn Pearce
  -- strict thread matches above, loose matches on Subject: below --
2006-12-14 11:26 Junio C Hamano
2006-12-14 12:13 ` Shawn Pearce

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=Pine.LNX.4.63.0612141151220.3635@wbgn013.biozentrum.uni-wuerzburg.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=spearce@spearce.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.
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).