I also added a flag to compute iter_changes() between the trees, and filter appropriately. So comparing the existing: "filter trees then iter_changes between filtered trees", to the proposed "compute filter file_ids, cache it, iter_changes and filter changes against file_ids".
The results look pretty good there (for 100 revisions):
2 key takeaways, --delta is cheaper for non-filtered trees, about 0.4s vs 0.9s for filtered comparisons.
Take these results with a grain of salt, though. Because adding up how many raw 'changes' were found gives different results. --delta --filter shows 610 changes in 100 revisions, --delta shows 599 changes. I'd have to look at the details to figure out what is going on.
I also added a flag to compute iter_changes() between the trees, and filter appropriately. So comparing the existing: "filter trees then iter_changes between filtered trees", to the proposed "compute filter file_ids, cache it, iter_changes and filter changes against file_ids".
The results look pretty good there (for 100 revisions):
4.2s --delta --filter
3.3s --filter
0.7s --delta
0.3s --no-delta --no-filter
2 key takeaways, --delta is cheaper for non-filtered trees, about 0.4s vs 0.9s for filtered comparisons.
Take these results with a grain of salt, though. Because adding up how many raw 'changes' were found gives different results. --delta --filter shows 610 changes in 100 revisions, --delta shows 599 changes. I'd have to look at the details to figure out what is going on.