Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] mechanical sympathy in netty-4

Hi,

On Wed, Oct 16, 2013 at 4:17 PM, Viktor Szathmary <phraktle@xxxxxxxxx> wrote:
> InputStreamReader allocates a HeapByteBuffer:
>
> org.eclipse.jetty.server.Request.getReader()
> java.io.InputStreamReader.<init>(InputStream, String)
> sun.nio.cs.StreamDecoder.forInputStreamReader(InputStream, Object, String)
> sun.nio.cs.StreamDecoder.<init>(InputStream, Object, Charset)
> sun.nio.cs.StreamDecoder.<init>(InputStream, Object, CharsetDecoder)
> java.nio.ByteBuffer.allocate(int)
> java.nio.HeapByteBuffer.<init>(int, int)

Sure, but this is JDK code, not Jetty code, so we have no control.

> also, the constructed BufferedReader allocates a new char[]:
>
> org.eclipse.jetty.server.Request.getReader()
> org.eclipse.jetty.server.Request$1.<init>(Request, Reader,
> ServletInputStream)
> java.io.BufferedReader.<init>(Reader)
> java.io.BufferedReader.<init>(Reader, int)

Same as above.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.


Back to the top