Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary copying bytes #1085

Closed
1 task done
kezhenxu94 opened this issue May 22, 2019 · 1 comment · Fixed by #1087
Closed
1 task done

Unnecessary copying bytes #1085

kezhenxu94 opened this issue May 22, 2019 · 1 comment · Fixed by #1087
Assignees

Comments

@kezhenxu94
Copy link
Member

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

there are many operations like:

https://github.com/seata/seata/blob/b7a930d0528030caca53c811d740703e3f676e94/core/src/main/java/io/seata/core/rpc/netty/MessageCodecHandler.java#L80-L82

in class io.seata.core.rpc.netty.MessageCodecHandler, which copies the bytes over and over, and it can just be replaced with:

out.writeBytes(byteBuffer);

if it makes sense to you, I'll send a PR to fix this, thanks :)

Ⅲ. Describe what you expected to happen

no unnecessary copies

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 a pull request may close this issue.

2 participants