Closed GoogleCodeExporter closed 9 years ago
Kryo serializers write to a ByteBuffer directly. When the buffer is overrun, it
throws an exception which unrolls the stack all the way back to the
ObjectBuffer, where the buffer size is doubled. At this point, there is no way
to resume serialization where the overrun occurred, so serialization has to
start from the beginning. The only thing that will really help is to use a
larger initial buffer size.
The solution to this is to have Kryo not use ByteBuffer directly, but to use a
Kryo specific buffer class. This would allow the buffer to grow without copying
and without interrupting serialization (by keeping a list of buffers and
allocating new ones as needed). It would also allow more flexibility when
dealing with streams. I've collected a number of ideas for a rewrite of Kryo,
but don't currently have a timeline.
Original comment by nathan.s...@gmail.com
on 9 Mar 2011 at 12:37
Original issue reported on code.google.com by
rbakhru@gmail.com
on 9 Mar 2011 at 12:28