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

perf(cli): Split off highly divergent branches #220

Merged
merged 5 commits into from
Mar 23, 2022
Merged

Conversation

epage
Copy link
Collaborator

@epage epage commented Mar 23, 2022

In #216, a user is backporting changes on Linux and hadn't marked
protected branches which would serve as bases, causing git-stack to
topologically sort commits that are very distant from each other,
causing a simple showing of the commit graph to take 20-30s.

This change infers that these branches are do not belong to their base
and split them off. Now showing the commit graph takes about 6s as it
tries each base.

epage added 5 commits March 22, 2022 09:10
Originally, we would bail out if there is no base.  We might split
off branches that are very-divergent branches from their base, so we
need to make this better.  The first step was allowing it.  This is the
next where we infer a "good enough" base to probide context for the
user.
In gitext-rs#216, a user is backporting changes on Linux and hadn't marked
protected branches which would serve as bases, causing git-stack to
topologically sort commits that are very distant from each other,
causing a simple showing of the commit graph to take 20-30s.

This change infers that these branches are do not belong to their base
and split them off.  Now showing the commit graph takes about 6s as it
tries each base.
@epage epage merged commit a2ca9d1 into gitext-rs:main Mar 23, 2022
@epage epage deleted the base branch March 23, 2022 17:55
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

Successfully merging this pull request may close these issues.

1 participant