John Keyes wrote:My point here is that if I have X requests then there can be X * CONTENT_LENGTH_CHUNKED bytes in memory at one time.
I see what you mean. But the above calculation does not make sense: CONTENT_LENGTH_CHUNKED is a (negative) integer that signals to HttpClient that you do not want the request to be buffered.
Doh! I didn't research that, I assumed it meant it was a chunk size.
As previously pointed out by others the (implicit) small buffering in memory is hardly avoidable and you should just accept it as a fact. Even with thousands of connection this should not be too much of a problem if you configure your JVM to use enough memory.
Yeah. I need to put some more thought into what I was saying. Memory shouldn't be an issue but we are trying to cover the bases.
Currently the buffer size is hard coded in EntityEnclosingMethod::writeRequestBody to 4096 bytes. Maybe we could make this configurable if this helps you.
It's always good to have things configurable :-)
Thanks, -John K
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]