This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA/JDWP] Event basics
- From: Keith Seitz <keiths at redhat dot com>
- To: Cedric Berger <cedric at berger dot to>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>, classpath patches <classpath-patches at gnu dot org>
- Date: Wed, 22 Jun 2005 12:55:06 -0700
- Subject: Re: [RFA/JDWP] Event basics
- References: <42B9BEF3.6010306@berger.to>
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