On Sun, Feb 14, 2010 at 10:56:46PM +0300, Dmitry Potapov wrote: > It may not work without enough swap space, and it will not pretty anyway > due to swapping. So, I see the following options: > > 1. to introduce a configuration parameter that will define whether to use > mmap() to hash files or not. It is a trivial change, but the real question > is what default value for this option (should we do some heuristic based > on filesize vs available memory?) I'm a fan of having the option. It lets users who know what they're doing (and who might be doing something unusual, like files that are large relative to memory size, or files that are being modified during git add) decide how to make the performance-robustness trade-off. "Large" is relative. How common is it to add files to git that are large relative to the RAM size of the machine? I have a machine with 6GB of RAM and a repo on that machine with half a dozen 0.5-1.5GB files in it. Git add is painfully slow on that repo even with mmap(). I wouldn't dare trying to manipulate that repo on a machine with less than 1GB of RAM. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html