Re: Mercurial 0.4b vs git patchbomb benchmark
From: Matt Mackall <hidden>
Date: 2016-06-15 22:41:55
On Sat, Apr 30, 2005 at 07:44:17AM -0700, Adam J. Richter wrote:
I'd like to mention a couple of possible optimizations for both the with and without compression approaches. If you remove the gzip compression, then I imagine you could do much of the IO of checking out files via sendfile, without ever copying data to program space or even changing the program's memory map. There apparently exists a python sendfile module. If this mercurial were written in C, much of the rest of the IO could be optimized with mmap (to reduce copies) and writev in the absense of a compression pass. I don't know enough about python to know if these optimizations are available.
Python can do mmap, not sure about writev. But I'm currently still in the "keep it as simple as possible" stage. There's a bunch of room for optimization still, but if I do it all now, it'll make things hard when I run into the next design change. And there's still some important core work that needs doing - checkout and commit need to be a subcase of the core merge code. -- Mathematics is the supreme nostalgia of our time.