On 12/7/11 5:39 PM, "Nguyen Thai Ngoc Duy" <pclouds@xxxxxxxxx> wrote: >On Thu, Dec 8, 2011 at 5:48 AM, Joshua Redstone <joshua.redstone@xxxxxx> >wrote: >> Hi Duy, >> Thanks for the documentation link. >> >> git ls-files shows 100k files, which matches # of files in the working >> tree ('find . -type f -print | wc -l'). > >Any chance you can split it into smaller repositories, or remove files >from working directory (e.g. if you store logs, you don't have to keep >logs from all time in working directory, they can be retrieved from >history). It's not really feasible to split it into smaller repositories. In fact, we're expecting it to grow between 3x and 5x in number of files and number of commits. > >> I added a 'git read-tree HEAD' before the git-add, and a 'git >>write-tree' >> after the add. With that, the commit time slowed down to 8 seconds per >> commit, plus 4 more seconds for the read-tree/add/write-tree ops. The >> read-tree/add/write-tree each took about a second. > >read-tree destroys stat info in index, refreshing 100k entries in >index in this case may take some time. Try this to see if commit time >reduces and how much time update-index takes > >read-tree HEAD >update-index --refresh >add .... >write-tree >commit -q I added the "update-index --refresh" and the time for commit became more like 0.6 seconds. In this setup: read-tree takes ~2 seconds, update-index takes ~8 seconds, git-add takes 1 to 4 seconds, and write-tree takes less than 1 second. > >> As an experiment, I also tried removing the 'git read-tree' and just >> having the git-write-tree. That sped up commits to 0.6 seconds, but the >> overall time for add/write-tree/commit was still 3 to 6 seconds. > >overall time is not really important because we duplicate work here >(write-tree is done as part of commit again). What I'm trying to do is >to determine how much time each operation in commit may take. >-- >Duy -- 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