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

Bundle copy can be faster #35

Open
guillaumerose opened this issue May 10, 2021 · 1 comment
Open

Bundle copy can be faster #35

guillaumerose opened this issue May 10, 2021 · 1 comment

Comments

@guillaumerose
Copy link

On my machine, the bundle copy from the cache to the machine directory takes around 6s with the Go code.
With cp it takes 4s.

Related code: https://github.com/code-ready/machine-driver-hyperkit/blob/master/pkg/hyperkit/copy.go#L8

@cfergeau
Copy link

The copy code is mostly a call to io.Copy(out, in), if there are improvements to be made, they may belong to this module. Or could it be a fsync/no fsync difference?
Btw, defer out.Close() is frowned upon as we could miss errors (https://www.joeshaw.org/dont-defer-close-on-writable-files/ )

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

No branches or pull requests

2 participants