Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limiting commits to a path is slow #1

Open
medwards opened this issue Apr 4, 2022 · 0 comments
Open

Limiting commits to a path is slow #1

medwards opened this issue Apr 4, 2022 · 0 comments

Comments

@medwards
Copy link
Owner

medwards commented Apr 4, 2022

Filtering commits to a path was done in a inefficient way (on the fly check diffs for matching paths). The current version walks the tree once to gather all commit hashes so it can filter by those instead (much faster on-the-fly), however this introduces a significant startup cost (~6s on a 7752 commit tree).

There must be smarter ways to do this because gitk startup time for the same task is barely noticeable.

medwards added a commit that referenced this issue Apr 8, 2022
Trying to fix #1, the high level idea here is to only walk the revision
graph once, as the graph is walked then commits are also stored in a
cache so that if the user goes back up the history we don't have to
start a new walker. Instead older commits are served from the cache.

This would mean we could probably remove the startup tree scan for
matching commits entirely at the cost of growing memory usage over time.

However, I painted myself into a corner /w the borrow checker and
probably need to revisit an abstraction here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant