It is for performance.

When you start writing content, it initially goes into a buffer.  Once the
response is committed, we need to generate a header, which can be of
variable size.  So rather than moving the content up in it's buffer we use
a separate header buffer and then to a gather write to write the headers
and content as a single write.

cheers


On 18 September 2013 17:50, Polina Koleva <[email protected]> wrote:

> That's helpful. But I wonder why  jetty have two buffers - one for header
> and
> one for body of request/response? Is that improve performance and how?
>
> Polina
>
>
>
> --
> View this message in context:
> http://jetty.4.x6.nabble.com/jetty-users-Buffers-in-Jetty-8-tp4961212p4961223.html
> Sent from the Jetty User mailing list archive at Nabble.com.
> _______________________________________________
> jetty-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>



-- 
Greg Wilkins <[email protected]>
http://www.webtide.com
Developer advice and support from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to