mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #726, 优化SessionHandler里直接拼byte[],绕过protobuf的多次拷贝
This commit is contained in:
@@ -319,7 +319,8 @@ public class SimpleCanalConnector implements CanalConnector {
|
||||
}
|
||||
|
||||
private Message receiveMessages() throws IOException {
|
||||
Packet p = Packet.parseFrom(readNextPacket());
|
||||
byte[] data = readNextPacket();
|
||||
Packet p = Packet.parseFrom(data);
|
||||
switch (p.getType()) {
|
||||
case MESSAGES: {
|
||||
if (!p.getCompression().equals(Compression.NONE)) {
|
||||
|
||||
Reference in New Issue
Block a user