Skip to content

Commit

Permalink
[fix] allocate significantly less iniitial memory per scanner created
Browse files Browse the repository at this point in the history
  • Loading branch information
robinovitch61 committed Dec 28, 2024
1 parent 5cc427c commit c27b779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (c clientImpl) GetLogStream(
// create a scanner that reads lines from the log stream
scanner := bufio.NewScanner(logStream)
maxLineLength := 1024 * 1024 * 1024
scanner.Buffer(make([]byte, maxLineLength), maxLineLength)
scanner.Buffer(make([]byte, 64*1024), maxLineLength)
scanner.Split(bufio.ScanLines)
return scanner, cancel, nil
}
Expand Down

0 comments on commit c27b779

Please sign in to comment.