"git@developer.sourcefind.cn:change/sglang.git" did not exist on "4acf6902066c80b0c08371eaedbb8170a0b2914e"
Commit 9c7f30d3 authored by Michael Yang's avatar Michael Yang
Browse files

use max scan token size to hold large objects

parent 6ed3ec0c
...@@ -24,6 +24,7 @@ func Parse(reader io.Reader) ([]Command, error) { ...@@ -24,6 +24,7 @@ func Parse(reader io.Reader) ([]Command, error) {
var command, modelCommand Command var command, modelCommand Command
scanner := bufio.NewScanner(reader) scanner := bufio.NewScanner(reader)
scanner.Buffer(make([]byte, 0, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize)
scanner.Split(scanModelfile) scanner.Split(scanModelfile)
for scanner.Scan() { for scanner.Scan() {
line := scanner.Bytes() line := scanner.Bytes()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment