summaryrefslogtreecommitdiff
path: root/t/t2027-checkout-track.sh
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2021-02-14 07:51:51 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-15 18:02:16 -0800
commitf78cf976172fbad79a9ca4fc158f384fb868f177 (patch)
tree1e159e3a4bbb5653bfa7c9526544b312647ded78 /t/t2027-checkout-track.sh
parentgitdiffcore doc: mention new preliminary step for rename detection (diff)
downloadtgif-f78cf976172fbad79a9ca4fc158f384fb868f177.tar.xz
merge-ort: call diffcore_rename() directly
We want to pass additional information to diffcore_rename() (or some variant thereof) without plumbing that extra information through diff_tree_oid() and diffcore_std(). Further, since we will need to gather additional special information related to diffs and are walking the trees anyway in collect_merge_info(), it seems odd to have diff_tree_oid()/diffcore_std() repeat those tree walks. And there may be times where we can avoid traversing into a subtree in collect_merge_info() (based on additional information at our disposal), that the basic diff logic would be unable to take advantage of. For all these reasons, just create the add and delete pairs ourself and then call diffcore_rename() directly. This change is primarily about enabling future optimizations; the advantage of avoiding extra tree traversals is small compared to the cost of rename detection, and the advantage of avoiding the extra tree traversals is somewhat offset by the extra time spent in collect_merge_info() collecting the additional data anyway. However... For the testcases mentioned in commit 557ac0350d ("merge-ort: begin performance work; instrument with trace2_region_* calls", 2020-10-28), this change improves the performance as follows: Before After no-renames: 13.294 s ± 0.103 s 12.775 s ± 0.062 s mega-renames: 187.248 s ± 0.882 s 188.754 s ± 0.284 s just-one-mega: 5.557 s ± 0.017 s 5.599 s ± 0.019 s Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2027-checkout-track.sh')
0 files changed, 0 insertions, 0 deletions