classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Re: [RFA/JDWP] JdwpConnection cleanup


From: Bryce McKinlay
Subject: [cp-patches] Re: [RFA/JDWP] JdwpConnection cleanup
Date: Mon, 27 Jun 2005 17:23:06 -0400
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]