[RFA/JDWP] Event basics

Keith Seitz keiths@redhat.com
Wed Jun 22 20:08:00 GMT 2005


On Wed, 2005-06-22 at 21:41 +0200, Cedric Berger wrote:

> Here is just a little (or big) comment about that code: I don't
> know if performance is an issue or not in your code, but if
> performance is an issue, then I think that the code as written
> is very inefficient:

Indeed it is! But it works. :-) Seriously, though. I'll settle for
"works" over "fast". Fact is, I haven't seen java.nio used much (it's
all new to me).

> You allocate here a lot of different object (data, outStream, pkt - 
> which each allocate
> internal objects) just to generate a "JdwpPacket ", which will finally 
> be written to a
> socket I guess (?). I think that you could rewrite the code to allocate 
> much less
> objects during serialization/deserialization, and perform much less 
> copy. Actually,
> if you wanted, you could use java.nio and allocate almost NO objects.

I presume you mean a ByteBuffer?

I'll have to keep that in mind for any outstanding work. Perhaps I'll
just get what I have finished and then switch everything over in one
fell swoop.

Thanks for the pointer!
Keith



More information about the Java-patches mailing list