-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a ReaderAt instead of an in-memory cache to resolve deltas (#160)
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.
- Loading branch information
Showing
2 changed files
with
88 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters