Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 37480 invoked from network); 22 Feb 2008 15:36:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2008 15:36:01 -0000 Received: (qmail 32620 invoked by uid 500); 22 Feb 2008 15:35:56 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 32418 invoked by uid 500); 22 Feb 2008 15:35:56 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 32406 invoked by uid 99); 22 Feb 2008 15:35:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2008 07:35:56 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2008 15:35:31 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5B295234C03E for ; Fri, 22 Feb 2008 07:35:21 -0800 (PST) Message-ID: <633952360.1203694521372.JavaMail.jira@brutus> Date: Fri, 22 Feb 2008 07:35:21 -0800 (PST) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Subject: [jira] Commented: (HTTPCORE-92) NIO ChunkEncoder does not flush the session output buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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: ------------------------------------------- Andrea, 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 easier. Oleg > 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