From: Linus Torvalds Date: Tue, 19 Dec 2006 16:57:29 GMT Subject: Re: cloning the kernel - why long time in "Resolving 313037 deltas" Message-ID: In-Reply-To: <20061219161919.GA16980@thunk.org> On Tue, 19 Dec 2006, Theodore Tso wrote: > > So the main reason to use mamp, as Linus puts it, is if the management > overhead of needing to read lots of small bits of the file makes the > use of malloc/read to be a pain in the *ss, then go for it. An example of this in git is the regular pack-file accesses. We're MUCH better off just mmap'ing the whole pack-file (or at least big chunks of it) and not having to maintain difficult structures of "this is where I read that part of the file into memory", or read _big_ chunks when quite often we just use a few kB of it. So mmap for pack-files does make sense, but probably only when you can mmap big chunks, and are going to access much smaller (random) parts of it.