Jeff King wrote: > On Mon, Jul 03, 2006 at 11:13:34AM +0000, Joachim B Haga wrote: > >> often binary. In git, committing of large files is very slow; I have >> tested with a 45MB file, which takes about 1 minute to check in (on an >> intel core-duo 2GHz). > > I know this has already been somewhat solved, but I found your numbers > curiously high. I work quite a bit with git and large files and I > haven't noticed this slowdown. Can you be more specific about your load? > Are you sure it is zlib? Quite sure: at least to the extent that it is fixed by lowering the compression level. But the wording was inexact: it's during object creation, which happens at initial "git add" and then later during "git commit". But... > y 1.8Ghz Athlon, compressing 45MB of zeros into 20K takes about 2s. > Compressing 45MB of random data into a 45MB object takes 6.3s. In either > case, the commit takes only about 0.5s (since cogito stores the object > during the cg-add). > > Is there some specific file pattern which is slow to compress? yes, it seems so. At least the effect is much more pronounced for my files than for random/null data. "My" files are in this context generated data files, binary or ascii. Here's a test with "time gzip -[169] -c file >/dev/null". Random data from /dev/urandom, kernel headers are concatenation of *.h in kernel sources. All times in seconds, on my puny home computer (1GHz Via Nehemiah) random (23MB) data (23MB) headers (44MB) -9 10.2 72.5 38.5 -6 10.2 13.5 12.9 -1 9.9 4.1 7.0 So... data dependent, yes. But it hits even for normal source code. (Btw; the default (-6) seems to be less data dependent than the other values. Maybe that's on purpose.) If you want to look at a highly-variable dataset (the one above), try http://lupus.ig3.net/SIMULATION.dx.gz (5MB, slow server), but that's just an example, I see the same variability for example also on binary data files. -j. - : 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