You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue tracker is ONLY used for the go client (feature request of RocketMQ need to follow RIP process). Keep in mind, please check whether there is an existing same report before your raise a new one.
Alternately (especially if your communication is not a bug report), you can send mail to our mailing lists. We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as to the following:
BUG REPORT
Please describe the issue you observed:
Recently we've benchmarked our service which act as a RocketMQ consumer and I noticed that it spends much time on reflection while decoding remoting commands (as shown below):
After some investigations, I found it was caused by passing a byte slice pointer to binary.Read(). It makes binary.Read() to fallback to reflect-based decoding, consuming more CPU cycles.
The issue tracker is ONLY used for the go client (feature request of RocketMQ need to follow RIP process). Keep in mind, please check whether there is an existing same report before your raise a new one.
Alternately (especially if your communication is not a bug report), you can send mail to our mailing lists. We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as to the following:
BUG REPORT
Recently we've benchmarked our service which act as a RocketMQ consumer and I noticed that it spends much time on reflection while decoding remoting commands (as shown below):
After some investigations, I found it was caused by passing a byte slice pointer to
binary.Read()
. It makesbinary.Read()
to fallback to reflect-based decoding, consuming more CPU cycles.rocketmq-client-go/internal/remote/codec.go
Lines 227 to 231 in d6e66a2
There're two ways to solve this issue.
binary.Read()
io.ReadFull()
insteadI've tried the second way and got a ~1.9x performance boost on remoting command decoding:
before:
after:
The text was updated successfully, but these errors were encountered: