problem cloning large file (32MB) on Windows/Network Shares

Matt Mackall mpm at selenic.com
Mon Jan 17 13:59:40 CST 2011


On Sat, 2011-01-15 at 22:20 +0200, Fred Sundvik wrote:
> Why is the mercurial doing that big file writes in the first place?
> Isn't this the reason, why it needs a huge amount of memory when
> handling large files? Much better would be to use much smaller
> buffers, and alternate between reading and writing, which wouldn't
> require the whole file to be in memory. 

No, it works this way because it was designed from the ground up to work
this way. Mercurial was designed to be fast, with the foreknowledge that
a) being fast is important and b) handling large files in a distributed
system is always going to suck.

The delta algorithms Mercurial uses (and basically all such algorithms
designed to work on text) operate orders of magnitude faster when all
the data is in memory.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list