Skip to content

Conversation

mangobatao
Copy link

OpenReplicator is using XDeserializer to parse the row data byte[] rowData (Update, Write and Delete).

final byte[] compressedRowData = is.readBytes(is.available());
final byte[] rowData = Snappy.uncompress(compressedRowData, 0, compressedRowData.length);
is = new XDeserializer(rowData);
is.setReadLimit(rowData.length);

The underlying implementation of XDeserializer is using XInputStreamImpl, which needs to allocate another byte array. I wrote an XByteArrayInputStream which will use ByteArrayInputStream and point to the input byte[] rowData instead of allocating a new one. This class will make the implementation of XInputStream more CPU and memory friendly.

@mangobatao
Copy link
Author

@whitesock could you please help take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant