Skip to content

Fetch optimizations#142

Merged
rtimush merged 2 commits into
masterfrom
fetch-optimizations
Jun 28, 2024
Merged

Fetch optimizations#142
rtimush merged 2 commits into
masterfrom
fetch-optimizations

Conversation

@rtimush
Copy link
Copy Markdown
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
@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