directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: MINA ProtocolEncoder Strangeness
Date Thu, 19 Jan 2006 08:50:49 GMT
Hi Jacob,

I'm sorry for the late response first of all.  I hope you didn't
disappointed with our silence to your message.

2006/1/13, Jacob Barrett <JacobBa@attachmatewrq.com>:
>
> I am seeing a massive slow down in performance when making a change that
> I figured should improve performance.  I might be completely
> misunderstanding what is going on though.
>
> I have a ProtocolEncoder that like a ByteBuffer of header information
> gathered from the message it is encoding.  In the message object there
> is also a ByteBuffer of content.  When I put the content puffer into the
> header buffer and write that to the ProtocolEncoderOutput object I can
> achieve about 200KB/s throughput (there are other slowdowns unrelated to
> this).  What boggles me is when rather than putting the content buffer
> into header buffer I just simply write both buffers to the out it slows
> down to 4KB/s.  My thinking is that this should be more efficient
> because I am not moving the contents of one buffer to another buffer
> (about 1K worth of bytes) to just output both buffers anyway.  Now from
> what I understand both ByteBuffers are put in the ProtocolEncoderOutput
> queue and written out in order just as if the headers and contents were
> in one buffer.  Is this not the case?  Is something more going on when
> multiple ByteBuffers are put in the queue this way?


This is apparently strange behavior.  Are you on Windows platform?  I once
saw that Windows notifies the VM that the write buffer is ready too lately.
If you can reproduce this problem easily, we could test it by ourselves (if
setting up the testing process is easy enough).

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C

Mime
View raw message