Re: [PATCH] Avoid accessing a slow working copy during diffcore operations.
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Dec 14, 2006, 14:49 UTC
- Message-ID
- <81b0412b0612140649i71643aaar847460ca9e4cea48@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.63.0612141511110.3635@wbgn013.biozentrum.uni-wuerzburg.de>
On 12/14/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 11 quoted lines
> > > If Git is compiled with NO_FAST_WORKING_DIRECTORY set then we will > > > avoid looking at the working directory when the blob in question > > > is available within a packfile and the caller doesn't need the data > > > unpacked into a temporary file. > > > > Why can't it be useful in generic code? What are the downsides? > > 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
> 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