git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
	Junio C Hamano <junkio@cox.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] Avoid accessing a slow working copy during diffcore operations.
Date: Thu, 14 Dec 2006 16:37:35 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.63.0612141633340.3635@wbgn013.biozentrum.uni-wuerzburg.de> (raw)
In-Reply-To: <81b0412b0612140649i71643aaar847460ca9e4cea48@mail.gmail.com>

Hi,

On Thu, 14 Dec 2006, Alex Riesen wrote:

> On 12/14/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > It is usually cheaper to just read the file, especially if it is still 
> > cached, because the alternative means unpacking the loose object, or 
> > worse, unpacking the packed object _along_ with the objects in its 
> > delta chain.
> 
> But you have to read less, and even that could be in cache as well and 
> unpacking in userspace could be faster than open/write temporary/ read 
> temporary/close/unlink temporary file on a normal system

You have to unpack anyway, since even the loose objects are packed. But to 
reconstruct a deltified object, you have to reconstruct possibly many 
objects.

So yes, if you have it in the working directory (unpacked), it should be 
faster to just read it, especially if it is still in the filesystem cache.

> > Not every OS sucks cache-wise, and you should not make others suffer 
> > for Redmond's shortcomings.
> 
> I'm just do not understand why avoiding temporary file wouldn't help all 
> OSes, even if they do not suck cache-wise.

Ah! But it is not temporary! It is the "working copy", which means the 
file you have in the working directory. IOW it is an unpacked blob, which 
happens to be already unpacked anyway.

Ciao,
Dscho

  reply	other threads:[~2006-12-14 15:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14 11:15 [PATCH] Avoid accessing a slow working copy during diffcore operations Shawn O. Pearce
2006-12-14 13:57 ` Alex Riesen
2006-12-14 14:12   ` Johannes Schindelin
2006-12-14 14:49     ` Alex Riesen
2006-12-14 15:37       ` Johannes Schindelin [this message]
2006-12-15  9:55 ` Jakub Narebski
2006-12-15 15:05   ` Shawn Pearce
2006-12-16  6:03 ` Junio C Hamano
2006-12-16 11:54   ` Johannes Schindelin
2006-12-16 13:38     ` Junio C Hamano

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.0612141633340.3635@wbgn013.biozentrum.uni-wuerzburg.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=raa.lkml@gmail.com \
    --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).