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

Fetch optimizations #142

Merged
merged 2 commits into from
Jun 28, 2024
Merged

Fetch optimizations #142

merged 2 commits into from
Jun 28, 2024

Conversation

rtimush
Copy link
Collaborator

@rtimush rtimush commented Jun 28, 2024

  • When we know the commit hash, only fetch this commit (and its ancestors)
  • When we only have a revision/branch, only fetch the relevant refs (and their ancestors).

This makes fetches significantly faster. For example, for googleapis/googleapis, it decreases the time from 1m20s to about 30s.

An even bigger improvement would be to

  1. Shallow fetch. This is supported by libgit2 but I couldn't make it work.
  2. Sparse checkout. This is not even supported by libgit2.

#137

@rtimush rtimush requested a review from a team June 28, 2024 13:27
@rtimush rtimush merged commit 165a88f into master Jun 28, 2024
14 checks passed
@rtimush rtimush deleted the fetch-optimizations branch June 28, 2024 14:06
@rtimush rtimush mentioned this pull request Jul 2, 2024
rtimush added a commit that referenced this pull request Jul 2, 2024
## 🤖 New release
* `protofetch`: 0.1.5 -> 0.1.6

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.1.6](v0.1.5...v0.1.6)
- 2024-07-02

### Other
- Fetch optimizations
([#142](#142))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
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.

3 participants