Re: large files and low memory
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Oct 5, 2010, 10:59 UTC
- Message-ID
- <AANLkTik1kzzzOKFaJCWtwiYf5Vz8oNjZXD+-SAq-ZvAa@mail.gmail.com>
- In-Reply-To
- <20101004191657.GC6466@burratino>
On Tue, Oct 5, 2010 at 2:16 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 8 quoted lines
> 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).
Just tried valgrind massif on a 200MB file with master. It used ~270kb heap. I haven't tested but I believe git-checkout will keep the whole inflated copy in memory. So git-add alone does not help much.
-- Duy