When you do an add, it has to read through the files and generate a hash of the content. As such you will at a minimum find that it will take time proportional to the amount of time taken to read all of the files. Try timing cp * /dev/null or copy * NUL: and find out how long it takes to dump the files. A better estimate can be done by piping through sha1.
Obviously the time taken to do this is proportional to the size of the files. Adding 10000 empty files on my machine takes less than a second.
If your files are sourced from a network share then clearly you will be much more impacted by IO.
Alex On 24 Jul 2013, at 22:12, Christian Trutz wrote: Hello jgit developers,
I tested the JGit AddCommand performance with many files. Here the results: 100 files 12 sec. 1000 files 91 sec. 10000 files ? (too long)
The results are a little sobering for me. But the "original" git add . command is only a little better:
100 files 10 sec.
1000 files 70 sec.
10000 files ? (too long)
I think the main bottleneck is the harddisk IO... I will profile a little the JGit AddCommand and will try to find some possible other bottlenecks ...
Regards
Christian
|