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
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches