Skip to content

Improve performance of GC and stats for repos with multiple refs#1078

Merged
paraseba merged 2 commits intomainfrom
push-utulkwwkkqny
Jul 15, 2025
Merged

Improve performance of GC and stats for repos with multiple refs#1078
paraseba merged 2 commits intomainfrom
push-utulkwwkkqny

Conversation

@paraseba
Copy link
Copy Markdown
Collaborator

This avoids repeating computation (and I/O) when multiple branches/tags repeat parts of the tree (true in almost any repo that has more than one branch/tag)

This avoids repeating computation (and I/O) when multiple branches/tags
repeat parts of the tree (true in almost any repo that has more than one
branch/tag)
@paraseba paraseba requested review from dcherian and mpiannucci July 14, 2025 22:45
.err_into::<RepositoryError>();
pin!(roots);

while let Some(pointed_snap_id) = roots.try_next().await? {
Copy link
Copy Markdown
Collaborator

@dcherian dcherian Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How big a drag is this loop? Does it make sense to concurrently iterate over roots instead?

EDIT: I guess it's slow since we are pulling new snapshots for ancestry

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, there are a few optimizations we need to do here ... it's not totally trivial because we always need to keep track of things we have already seen, so there is mutable state across the threads. But totally doable.

@paraseba paraseba merged commit 504238e into main Jul 15, 2025
11 checks passed
@paraseba paraseba deleted the push-utulkwwkkqny branch July 15, 2025 18:47
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.

2 participants