Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 52215 invoked from network); 18 Jul 2008 01:16:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 01:16:10 -0000 Received: (qmail 11584 invoked by uid 500); 18 Jul 2008 01:16:09 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 11559 invoked by uid 500); 18 Jul 2008 01:16:09 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 11548 invoked by uid 99); 18 Jul 2008 01:16:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2008 18:16:09 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasonfister@gmail.com designates 72.14.204.168 as permitted sender) Received: from [72.14.204.168] (HELO qb-out-1314.google.com) (72.14.204.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 01:15:16 +0000 Received: by qb-out-1314.google.com with SMTP id f12so765274qba.40 for ; Thu, 17 Jul 2008 18:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=RE0fXhdcikLVqcI9yKX4pgIcjknxuBt0NFT8sPCKaZU=; b=Em6C+lQKadzbtUblBdht3aoDBVXPE17LeEN41nfJpUzmvln9VrOeLWI09xfUdt3z+9 24zrjTZq/Xamq/m6ITQJeY0ye6ZTyv3F3PUC5vTJYRRb55SSyBhfyo9fIAkpQZCFvvhw KN6HjZ4C4RcQ9R73mD773yeuK3U8r35QKedBA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=bmFGedtnVIFgTkULqB/nNHxCYVBg0XoNqPHCm1htKO7P56v7t7SJpOzNl6JpmsCN/A +FkXEZ7Q+fsKCSG0GNr39ydB1/epP2WUbHu51cNsQE9L21upsLrSRfkcpY/jVeMpiCW0 OHX7nDYa3P+UlvEpz8NNLSkfn7ZKOgvlvYMFM= Received: by 10.151.111.1 with SMTP id o1mr1334611ybm.189.1216343739978; Thu, 17 Jul 2008 18:15:39 -0700 (PDT) Received: by 10.151.83.1 with HTTP; Thu, 17 Jul 2008 18:15:39 -0700 (PDT) Message-ID: <98b241bd0807171815m216bab44o223404fa2bf375a8@mail.gmail.com> Date: Thu, 17 Jul 2008 21:15:39 -0400 From: "Jason Fister" To: modules-dev@httpd.apache.org Subject: Re: ap_get_client_block vs bucket brigades In-Reply-To: <20170a030807171452w98a6addna1b7d139650b9289@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7983_14948584.1216343739946" References: <98b241bd0807171206o6e1a6b4ai8d85f57bf7b68f45@mail.gmail.com> <20170a030807171452w98a6addna1b7d139650b9289@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_7983_14948584.1216343739946 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorin, On Thu, Jul 17, 2008 at 5:52 PM, Sorin Manolache wrote: > Just a caveat. Loop like this: > > while ((n = ap_get_client_block()) > 0) > ... > > and not > > while (already_read < request->remaining) { > n = ap_get_client_block(); > alread_read += n; > } > Thanks for pointing it out. I am infact looping like ur first example. > > request->remaining may be misleading, for example if the client PUSHes > compressed data request->remaining will indicate the size of the > compressed data while your module will most likely read the data that > is already decompressed by the DEFLATE filter on the input filter > chain. > > > 2. Will the use of bucket brigades have a positive impact on the > > performance? > > Most likely not. > Thanks for your help! Jason ------=_Part_7983_14948584.1216343739946--