forked from security/hakurei
internal/pkg: buffer tar reader
This significantly improves performance and is a good assumption since the primary use case of FileArtifact is over the network. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -114,7 +114,9 @@ func (a *tarArtifact) Cure(t *TContext) (err error) {
|
||||
err = closeErr
|
||||
}
|
||||
}(tr)
|
||||
tr = io.NopCloser(tr)
|
||||
br := t.cache.getReader(tr)
|
||||
defer t.cache.putReader(br)
|
||||
tr = io.NopCloser(br)
|
||||
|
||||
switch a.compression {
|
||||
case TarUncompressed:
|
||||
|
||||
Reference in New Issue
Block a user