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

System.arraycopy Improvement possible in FrameEncoder #12

Open
minborg opened this issue May 1, 2015 · 1 comment
Open

System.arraycopy Improvement possible in FrameEncoder #12

minborg opened this issue May 1, 2015 · 1 comment

Comments

@minborg
Copy link

minborg commented May 1, 2015

In org.simpleframework.http.socket.service.FrameEncoder ->

     for(int i = 0; i < data.length; i++) {
        message[i + 2] = data[i];
     }

and

  for (int i = 0; i < count; i++) {
     reply[i] = header[i];
  }
  for (int i = 0; i < length; i++) {
     reply[i + count] = data[i];
  }

Could be made using System.arraycopy instead.

@ngallagher
Copy link
Owner

Ya, this would likely improve the performance. I plan to use DirectByteBuffer internally in a future release, this should give a significant boost to performance.

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

No branches or pull requests

2 participants