summaryrefslogtreecommitdiff
path: root/t/t7501-commit.sh
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@linux-foundation.org>2007-08-10 12:21:20 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-08-10 14:00:11 -0700
commit288f072ec033cf917eed949119428db3626ddc71 (patch)
tree7b5c799aa7160c38aeabf8e681dae75fa0375ac2 /t/t7501-commit.sh
parentMove old index entry removal from "unpack_trees()" into the individual functions (diff)
downloadtgif-288f072ec033cf917eed949119428db3626ddc71.tar.xz
Optimize the common cases of git-read-tree
This optimizes bind_merge() and oneway_merge() to not unnecessarily remove and re-add the old index entries when they can just get replaced by updated ones. This makes these operations much faster for large trees (where "large" is in the 50,000+ file range), because we don't unnecessarily move index entries around in the index array all the time. Using the "bummer" tree (a test-tree with 100,000 files) we get: Before: [torvalds@woody bummer]$ time git commit -m"Change one file" 50/500 real 0m9.470s user 0m8.729s sys 0m0.476s After: [torvalds@woody bummer]$ time git commit -m"Change one file" 50/500 real 0m1.173s user 0m0.720s sys 0m0.452s so for large trees this is easily very noticeable indeed. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7501-commit.sh')
0 files changed, 0 insertions, 0 deletions