hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-368) Smarter use of buffers in SSLIOSession
Date Tue, 17 Dec 2013 09:33:09 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13850288#comment-13850288
] 

Oleg Kalnichevski commented on HTTPCORE-368:
--------------------------------------------

Do not worry about plugging it into HttpAsyncClient for the time being. Let's focus on getting
the fundamentals right. 

The overall approach looks all right. The downside is that SSLIOSession, which is already
a nasty b*tch, got even nastier. Can we try to do something to make new code less painful
to read?

(1) Can we provide a method #hasData (or some such) which would basically be a shortcut for
#isAquired() && #acquire().position > 0?

(2) Could you please use local variables for acquired buffers where possible to make it clearer
that we are working with the same buffer?  

(3) You also need to keep old constructors in order to keep the library backward compatible.
Make them use permanent buffer strategy by default.

Oleg 


> Smarter use of buffers in SSLIOSession
> --------------------------------------
>
>                 Key: HTTPCORE-368
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-368
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.3
>            Reporter: offbynull
>              Labels: patch
>             Fix For: 4.4
>
>         Attachments: SSLIOSession.patch, SSLIOSession3.patch
>
>
> We're using the async client to load test our comet infrastructure. We're frequently
running in to OutOfMemoryErrors due to the ByteBuffers allocated in SSLIOSession.
> The following is a quick-and-dirty patch to SSLIOSession that removes the buffers when
they aren't needed. Could we get this (or something similar to this) added in to httpcore-nio?



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message