It is about four times faster to use builder.setLength(0) compared to allocating a new builder.

Addtionally, the builder should be reset on the start record event. The reason is that the `endRecord()` event is never sent if an error occurs whil processing the record. In such cases the encoder will simple receive a new `startRecord()` event and has to discard any remaining data from the previous record.