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-92) NIO ChunkEncoder does not flush the session output buffer
Date Fri, 22 Feb 2008 15:35:21 GMT

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

Oleg Kalnichevski commented on HTTPCORE-92:


Probably that was not quite clear from the issue description. The main goal is to prevent
the session buffer from growing needlessly. There is point in trying to copy every single
byte from one buffer into another. NIO channels were primarily designed to enable the I/O
layer to transfer only as much data as possible without blocking or allocating additional
memory. So, instead of expanding the session buffer to accommodate the complete content of
the source buffer, the ChunkEncoder should flush session buffer and copy only as much data
from the source buffer the session buffer is capable of holding without having to expand its
capacity. That is it.

Please submit changes in the udiff (unified diff) format. This will make my life a little


> NIO ChunkEncoder does not flush the session output buffer
> ---------------------------------------------------------
>                 Key: HTTPCORE-92
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-92
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>            Reporter: Oleg Kalnichevski
>             Fix For: 4.0-beta2
>         Attachments: write_reworked.txt
> Present implementation of the NIO ChunkEncoder is over-simplistic. It always expands
the session output buffer to store more content instead of trying to free up space by flushing
the buffered content.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message