diff --git a/pkg/resource/stream.go b/pkg/resource/stream.go index 8186d53..0519fdc 100644 --- a/pkg/resource/stream.go +++ b/pkg/resource/stream.go @@ -47,12 +47,10 @@ func FromStream(ctx context.Context, path string, r io.Reader) (<-chan Resource, errors := make(chan error) go func() { - const initialBufSize = 4 * 1024 * 1024 // Start with 4MB - const maxBufSize = 256 * 1024 * 1024 // Start with 4MB - + const maxBufSize = 256 * 1024 * 1024 scanner := bufio.NewScanner(r) - buf := make([]byte, initialBufSize) - scanner.Buffer(buf, maxBufSize) // Resize up to 256MB + buf := make([]byte, maxBufSize) + scanner.Buffer(buf, maxBufSize) scanner.Split(SplitYAMLDocument) SCAN: