Re: [PATCH] RFC: git lazy clone proof-of-concept
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 12, 2008, 21:08 UTC
- Message-ID
- <alpine.LFD.1.00.0802121303450.2920@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LSU.1.00.0802122036150.3870@racer.site>
On Tue, 12 Feb 2008, Johannes Schindelin wrote:
> > I made the window much smaller (512 megabyte), and it still runs, after 27 > hours:
I'd suggest making the memory window smaller yet.
512MB is a *big* amount of memory, if you fill it up, and end up using an O(n**2) algorithm on the objects within the window (which it is: the repacking algorithm is O(n) in _total_ objects, but the constant part is basically O(winsize^2).
I'd suggest that a reasonable window memory limit is around just a few megabytes (eg 4MB to maybe 64MB). If you have "normal" source files, you're still going to be limited by the window _count_ size (assume normal source files are in the few tens of kB), and for those occasional large files, you'd better hope that the sort heursistics are good enough.
Linus