[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Re: [RFA/JDWP] Event basics
From: |
Keith Seitz |
Subject: |
[cp-patches] Re: [RFA/JDWP] Event basics |
Date: |
Wed, 22 Jun 2005 12:55:06 -0700 |
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