You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/06/24 15:54:23 UTC

[jira] [Commented] (CAMEL-6483) Optimize writing response in camel-jetty

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

Claus Ibsen commented on CAMEL-6483:
------------------------------------

See also
http://stackoverflow.com/questions/9031311/slow-transfers-in-jetty-with-chunked-transfer-encoding-at-certain-buffer-size

And in camel-core we should optimize the IOHelper.copy that copies from IN -> OS. As when we use a byte array IS, then we have a fixed length of the array as the buffer size. This can be optimized, so we wont create too big byte arrays for the copy loop. For example if we only need to copy 100 bytes, then instead of creating a 4096 bytes array. We just create the 100 bytes. 
                
> Optimize writing response in camel-jetty
> ----------------------------------------
>
>                 Key: CAMEL-6483
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6483
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.12.0
>
>
> If using chunked mode, we should flush on each write, as Jetty handles this better.
> Also we should if do direct streaming from CachedOutputStream if that is in used, if chunked was forced disabled. This avoids an intermediate buffer copy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira