Improved memory & cpu consumption #22 (@zdyj3170101136 )
The API for parser changed. Now we parse one event at a time and if you need all the events, you need to copy it yourself.
chunks, err := parser.Parse(reader)
for _, chunk := range chunks {
for chunk.Next() {
chunk.Event // it may be reused, copy it if you need the event after another call to Next
}
err = chunk.Err()
if err != nil {
panic(err)
}
}