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

Use a ReaderAt instead of an in-memory cache to resolve deltas #160

Merged
merged 1 commit into from
Oct 11, 2018

Conversation

driusan
Copy link
Owner

@driusan driusan commented Oct 10, 2018

This retrieves objects from a pack file by using an io.ReaderAt
of the packfile rather an in-memory cache of objects that have
been found so far. The result is that the amount of memory required
to do a fetch or clone is proportional to the number of objects,
rather than proportional to the total fully resolved object size of
everything in the pack.

With this change, I was able to dgit clone https://github.com/golang/go
using 311Mb of RAM (according to top) in 12 minutes. (The clone then
paniced while trying to reset the index, but I was able to manually do
a "dgit reset --hard" and get a fully checked out copy of the Go repo.)

Partially resolves #147.

This retrieves objects from a pack file by using an io.ReaderAt
of the packfile rather an in-memory cache of objects that have
been found so far. The result is that the amount of memory required
to do a fetch or clone is proportional to the number of objects,
rather than proportional to the total fully resolved object size of
everything in the pack.

With this change, I was able to dgit clone https://github.com/golang/go
using 311Mb of RAM (according to top) in 12 minutes. (The clone then
paniced while trying to reset the index, but I was able to manually do
a "dgit reset --hard" and get a fully checked out copy of the Go repo.)

Partially resolves #147.
@driusan driusan merged commit ec66dfd into master Oct 11, 2018
@driusan driusan deleted the ReaderAtIndexing branch October 18, 2018 00:02
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.

very slow and memory taxing clone of a big repo
1 participant