stoewer/go-nakadi

simpleStream.nextEvents() Allocates new bytes slice on each call to read json

server-may-cry opened this issue · 0 comments

Simple stream allocates new slice of bytes on each call to read json line. This allocation became significant when simple_stream reads big json faster than GC frees memory.

func (s *simpleStream) nextEvents() (Cursor, []byte, error) {