[RFA/JDWP] JdwpConnection cleanup
Bryce McKinlay
mckinlay@redhat.com
Tue Jun 28 01:29:00 GMT 2005
Keith Seitz wrote:
>I believe the attached patch addresses concerns over temporary
>OutputStream allocations.
>
>
Yes, this looks better. At least by using reset() on the
ByteArrayOutputStream we are eliminating one level of allocation and
potential copying. Aaron managed to convince me that the
ByteArrayOutputStream was better than using ByteBuffer, at least for
now. However, there is still a bit too much copying going on - couldn't
JdwpPacket.toBytes() write directly to the stream, instead of creating
another temporary byte[]? That can be fixed in another patch, though.
>The changes in this patch are reflected in
>gnu.classpath.jdwp.event.Event submission.
>
>Comments/questions/concerns?
>Keith
>
>ChangeLog
> * gnu/classpath/jdwp/transport/JdwpConnection.java (sendPacket): Rename
> to ...
> (send): ... this.
> (send): New overloaded method for sending Events.
>
>
I think I liked the old sendPacket() name better, but maybe thats just me :)
Otherwise, this looks OK.
Bryce
More information about the Java-patches
mailing list