Skip to content
Snippets Groups Projects
Commit 830f3071 authored by Georges Racinet's avatar Georges Racinet
Browse files

ListLastCommitForTree: avoid climbing the entire changelog for each path

The new algorithm in `latest_changeset_for_path` was more efficient on
average than using the `files` revset predicate on a single path, but
it was inefficient to do it over and over for a serious amount of paths
in `ListLastCommitsForTree`.

We now climb the changelog only once, keeping track of wanted files
and subdirectories along the way.

Measurements taken on the `tests/` directory of the mercurial-devel
repository (in seconds):

revset based:     270s
parent changeset: 426s
this changeset:    19s

Figures taken before a small
fix on the new implementation that could have improved performance.

This is still quite bad, but less catastrophic than it was, and it is
amenable to a Rust reimplementation.
parent 798ac9c4
No related branches found
No related tags found
2 merge requests!198Merge stable branch,!195LastCommitForTree... performance improvements
Pipeline #71831 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment