grotere buffer voor scanner

This commit is contained in:
Peter Kleiweg
2026-08-04 13:32:12 +02:00
parent 1de42635d0
commit c37c54148e
26 changed files with 44 additions and 6 deletions

View File

@@ -41,6 +41,7 @@ func main() {
fp, err := os.Open("../" + dirname + "/" + name)
x(err)
scanner := bufio.NewScanner(fp)
scanner.Buffer(nil, 1000000)
for scanner.Scan() {
seen[strings.Split(scanner.Text(), "\t")[1]] = true
}
@@ -55,6 +56,7 @@ func main() {
fpout, err := os.Create(target)
x(err)
scanner := bufio.NewScanner(fpin)
scanner.Buffer(nil, 1000000)
n := 0
for scanner.Scan() && n < 20 {
line := scanner.Text()