Commit 1343c89
revision.c: consult Bloom filters for root commits
The commit-graph stores changed-path Bloom filters which represent the
set of paths included in a tree-level diff between a commit's root tree
and that of its parent.
When a commit has no parents, the tree-diff is computed against that
commit's root tree and the empty tree. In other words, every path in
that commit's tree is stored in the Bloom filter (since they all appear
in the diff).
Consult these filters during pathspec-limited traversals in the function
`rev_same_tree_as_empty()`. Doing so yields a performance improvement
where we can avoid enumerating the full set of paths in a parentless
commit's root tree when we know that the path(s) of interest were not
listed in that commit's changed-path Bloom filter.
Suggested-by: SZEDER Gábor <[email protected]>
Original-patch-by: Jonathan Tan <[email protected]>
Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent f88611c commit 1343c89
2 files changed
+28
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
| 837 | + | |
837 | 838 | | |
838 | 839 | | |
| 840 | + | |
839 | 841 | | |
840 | 842 | | |
841 | 843 | | |
842 | 844 | | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
843 | 851 | | |
844 | 852 | | |
845 | 853 | | |
846 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
847 | 858 | | |
848 | 859 | | |
849 | 860 | | |
| |||
881 | 892 | | |
882 | 893 | | |
883 | 894 | | |
884 | | - | |
| 895 | + | |
885 | 896 | | |
886 | 897 | | |
887 | 898 | | |
| |||
977 | 988 | | |
978 | 989 | | |
979 | 990 | | |
980 | | - | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
981 | 999 | | |
982 | 1000 | | |
983 | 1001 | | |
| |||
1058 | 1076 | | |
1059 | 1077 | | |
1060 | 1078 | | |
1061 | | - | |
| 1079 | + | |
1062 | 1080 | | |
1063 | 1081 | | |
1064 | 1082 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
178 | | - | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| |||
0 commit comments