tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <>
Subject Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote
Date Tue, 09 Apr 2002 18:09:43 GMT
> costin      02/04/09 10:57:13
>   Modified:    coyote/src/java/org/apache/coyote
>   Log:
>   Added (another) piece of comment ( after hunting for NPEs :-)
>   The way InputBuffer is used is different from OutputBuffer - the param
>   is empty, the byte[]. The protocol is supposed to provide it.
>   BTW, this is a very cool idea - it avoids one copy and allocations,
>   and simplifies the code. But it deserves a comment :-).

Yes, indeed. I worked hard so that there wouldn't be any useless copy.

>   One question for future - who should 'own' the OutputBuffer's buffer ?
>   If we consistently say that the buffers are owned by the protocol we
>   could make another improvement in speed - since in Ajp case we could
>   avoid another copy.

I don't see why, but it's another story.
The adapter has to have its own buffer, so it is perfectly admissible for it
to use it. After that, the protocol can do whatever it wants.
Also, since there's no way to pass the pointer to the buffer to the adapter,
I don't see how the adapter could use an internal buffer.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message