simpleframework
simpleframework copied to clipboard
System.arraycopy Improvement possible in FrameEncoder
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.
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.