Re: large files and low memory
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 4, 2010, 19:16 UTC
- Message-ID
- <20101004191657.GC6466@burratino>
- In-Reply-To
- <AANLkTin-mbzt93DWtp71vYBEUcDLHgo=G-6zynT5NC_r@mail.gmail.com>
Shawn Pearce wrote:
> This change only removes the deflate copy. But due to the SHA-1 > consistency issue I alluded to earlier, I think we're still making a > full copy of the file in memory before we SHA-1 it or deflate it.
Hmm, I _think_ we still use mmap for that (which is why 748af44c needs to compare the sha1 before and after).
But
1) a one-pass calculation would presumably be a little (5%?) faster
2) if there are smudge/clean filters or autocrlf involved, the
cleaned-up file is backed by swap and this all becomes moot.