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 tempfiles for not-yet-uploaded pack files #481

Merged
merged 8 commits into from
Mar 6, 2016
Merged

Conversation

fd0
Copy link
Member

@fd0 fd0 commented Mar 6, 2016

This reduces memory usage, as pack files that haven't been uploaded yet are not held in memory but written to temp files.

}

const minPackSize = 4 * 1024 * 1024
const maxPackSize = 16 * 1024 * 1024
const maxPackers = 200

// NewPackerManager returns an new packer manager which writes temporary files
// to a temporary directory
func NewPackerManager(be Saver, key *crypto.Key) *packerManager {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported func NewPackerManager returns unexported type *repository.packerManager, which can be annoying to use

fd0 added 3 commits March 6, 2016 13:59
This can be removed once we require Go 1.6.
This needs to be done since for Go < 1.6 rand.Rand does not implement
io.Reader.
@fd0 fd0 merged commit e4a6dd8 into master Mar 6, 2016
fd0 added a commit that referenced this pull request Mar 6, 2016
Use tempfiles for not-yet-uploaded pack files
@fd0 fd0 deleted the fix-memory-usage branch March 6, 2016 15:29
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.

None yet

2 participants