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

Re: [PATCH] Avoid accessing a slow working copy during diffcore operations.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 14, 2006, 15:37 UTC
Message-ID
<Pine.LNX.4.63.0612141633340.3635@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<81b0412b0612140649i71643aaar847460ca9e4cea48@mail.gmail.com>
Hi,
On Thu, 14 Dec 2006, Alex Riesen wrote:
Show 10 quoted lines
> 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.

Show 5 quoted lines
> > 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

Previous: Alex RiesenNext: Jakub Narebski
Message 5 of 10 in “Avoid accessing a slow working copy during diffcore operations.”
  1. Avoid accessing a slow working copy during diffcore operations.Shawn O. Pearce, Dec 14, 2006
  2. Alex RiesenDec 14, 2006
  3. Johannes SchindelinDec 14, 2006
  4. Alex RiesenDec 14, 2006
  5. Johannes SchindelinDec 14, 2006
  6. Jakub NarebskiDec 15, 2006
  7. Shawn PearceDec 15, 2006
  8. Junio C HamanoDec 16, 2006
  9. Johannes SchindelinDec 16, 2006
  10. Junio C HamanoDec 16, 2006

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.