From: Junio C Hamano Date: Sun, 14 Feb 2010 03:14:01 GMT Subject: Re: [PATCH] don't use mmap() to hash files Message-ID: <7v8wawy0ee.fsf@alter.siamese.dyndns.org> In-Reply-To: <20100214021847.GA9704@dpotapov.dyndns.org> Dmitry Potapov writes: > My initial reaction was to write that the whole problem is due to abuse > Git for the purposes that it was not intended. But then I decided to do > some testing to see what impact it has. And, because I do not see any > negative impact (in fact, slightly improve speed), and I decided to ask > other people (who are interested in this patch) to do more testing. Yes, I know, and I greatly appreciate it. Later, we might want to split the codepath again to: (0) see if it is huge or small if we are not reading from pipe; (1) if we do not know the size or if it is moderately tiny, keep doing what your code does; (2) if we know we are reading something huge with known size, then have a loop to read-a-bit-compress-and-write-it-out-while-hashing, and finally rename the loose resulting object to the final name. Or we may even want to do that into a new pack on its own. but obviously all of that can come after this initial round ;-)