Don't you have to .Reset() the buffer or something like that? Otherwise you'll be appending to the same buffer over and over and it will get huge and reallocate all the time.

Reply to this note

Please Login to reply.

Discussion

well, make the change, it's way faster, but yes, probably it should be doing buf.Reset()

i'm probably gonna have to write a better bytes.Buffer now after seeing this shit

also, maybe bufio is the droids we are looking for here