Skip to content

[ROCKETMQ-253]Compress RegisterBrokerBody#140

Closed
lizhanhui wants to merge 4 commits intoapache:developfrom
lizhanhui:compress_heartbeat
Closed

[ROCKETMQ-253]Compress RegisterBrokerBody#140
lizhanhui wants to merge 4 commits intoapache:developfrom
lizhanhui:compress_heartbeat

Conversation

@lizhanhui
Copy link
Contributor

Refer to the description part of this issue please.

@coveralls
Copy link

coveralls commented Jul 30, 2017

Coverage Status

Coverage decreased (-0.08%) to 39.122% when pulling 43173b4 on lizhanhui:compress_heartbeat into 33a99a4 on apache:develop.

@coveralls
Copy link

coveralls commented Jul 31, 2017

Coverage Status

Coverage decreased (-0.2%) to 39.04% when pulling 63ac649 on lizhanhui:compress_heartbeat into 33a99a4 on apache:develop.

@lindzh
Copy link
Contributor

lindzh commented Jul 31, 2017

Wonderfull,it's a good idea to make package smaller.

@lizhanhui
Copy link
Contributor Author

@lindzh Welcome to review this PR.

requestBody.setTopicConfigSerializeWrapper(topicConfigWrapper);
requestBody.setFilterServerList(filterServerList);
request.setBody(requestBody.encode());
request.setBody(requestBody.encode(true));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea!
How about setting a threshold for compression being triggered, because if the data you compress is small, it overhead is higher than the benefits you get from the compression?

}

ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
DeflaterOutputStream outputStream = new DeflaterOutputStream(byteArrayOutputStream, new Deflater(Deflater.BEST_COMPRESSION));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Deflater.BEST_COMPRESSION may be even slower than GZIP. Do we care about compression speed?

@coveralls
Copy link

coveralls commented Aug 22, 2017

Coverage Status

Coverage decreased (-1.9%) to 37.329% when pulling 9f3af40 on lizhanhui:compress_heartbeat into 33a99a4 on apache:develop.

@vongosling
Copy link
Member

I will close the pr, if you happened to the same question, please let me know.

@vongosling vongosling closed this Jul 14, 2018
pingww added a commit that referenced this pull request Aug 26, 2022
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.

5 participants