Commit bfab7ff
committed
diffcore-rename: use directory rename guided basename comparisons
Hook the work from the last several patches together so that when
basenames in the sets of possible remaining rename sources or
destinations aren't unique, we can guess which directory source files
were renamed into. When that guess gives us a pairing of files, and
those files are sufficiently similar, we record the two files as a
rename and remove them from the large matrix of comparisons for inexact
rename detection.
For the testcases mentioned in commit 557ac03 ("merge-ort: begin
performance work; instrument with trace2_region_* calls", 2020-10-28),
this change improves the performance as follows:
Before After
no-renames: 12.775 s ± 0.062 s 12.596 s ± 0.061 s
mega-renames: 188.754 s ± 0.284 s 130.465 s ± 0.259 s
just-one-mega: 5.599 s ± 0.019 s 3.958 s ± 0.010 s
Signed-off-by: Elijah Newren <newren@gmail.com>1 parent 89a97ee commit bfab7ff
2 files changed
Lines changed: 29 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
672 | 671 | | |
673 | 672 | | |
674 | 673 | | |
| |||
784 | 783 | | |
785 | 784 | | |
786 | 785 | | |
787 | | - | |
788 | | - | |
789 | 786 | | |
790 | 787 | | |
791 | 788 | | |
| |||
835 | 832 | | |
836 | 833 | | |
837 | 834 | | |
838 | | - | |
839 | | - | |
840 | | - | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
841 | 839 | | |
842 | | - | |
843 | | - | |
844 | 840 | | |
845 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
846 | 852 | | |
847 | 853 | | |
848 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
849 | 868 | | |
850 | 869 | | |
851 | 870 | | |
| |||
0 commit comments