diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-11 02:08:44 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-11 02:08:44 +0900 |
| commit | dbb89dfb0f15121009a927945b09bc309a3e3e41 (patch) | |
| tree | a98be6e9f8d69f5a67836829b6b6b9931966a403 /internal | |
| parent | de06ea2be42d865bc19fb2baa27379229cdf7dcb (diff) | |
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>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/pkg/tar.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/pkg/tar.go b/internal/pkg/tar.go index 77e4ee27..39f55010 100644 --- a/internal/pkg/tar.go +++ b/internal/pkg/tar.go @@ -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: |
