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

Load Git trees lazily on checkout #8190

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Load Git trees lazily on checkout #8190

wants to merge 1 commit into from

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Oct 14, 2024

Exploring #3950

@zanieb zanieb added the performance Potential performance improvement label Oct 14, 2024
@zanieb
Copy link
Member Author

zanieb commented Oct 14, 2024

Turns out this is still really hard. Some weird behavior due to our local clone, I think?

@zanieb
Copy link
Member Author

zanieb commented Oct 14, 2024

I suspect that we are doing a dynamic fetch and the promisor is the sparse local tree?

Since almost all Git code currently expects any referenced object to be present locally and because we do not want to force every command to do a dry-run first, a fallback mechanism is added to allow Git to attempt to dynamically fetch missing objects from promisor remotes.

When the normal object lookup fails to find an object, Git invokes promisor_remote_get_direct() to try to get the object from a promisor remote and then retry the object lookup. This allows objects to be "faulted in" without complicated prediction algorithms.

Dynamic object fetching will only ask promisor remotes for missing objects. We assume that promisor remotes have a complete view of the repository and can satisfy all such requests.

Which fails since git/git@301f1e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Potential performance improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants