Return-Path: Delivered-To: apmail-jakarta-httpclient-dev-archive@www.apache.org Received: (qmail 65822 invoked from network); 19 Jan 2006 11:26:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jan 2006 11:26:00 -0000 Received: (qmail 5036 invoked by uid 500); 19 Jan 2006 11:25:59 -0000 Delivered-To: apmail-jakarta-httpclient-dev-archive@jakarta.apache.org Received: (qmail 5011 invoked by uid 500); 19 Jan 2006 11:25:57 -0000 Mailing-List: contact httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "HttpClient Project" Reply-To: "HttpClient Project" Delivered-To: mailing list httpclient-dev@jakarta.apache.org Received: (qmail 5000 invoked by uid 99); 19 Jan 2006 11:25:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2006 03:25:57 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.186.18.66] (HELO mail21.bluewin.ch) (195.186.18.66) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2006 03:25:56 -0800 Received: from [192.168.0.2] (213.3.48.50) by mail21.bluewin.ch (Bluewin 7.2.070) id 43C620F40027AF8B for httpclient-dev@jakarta.apache.org; Thu, 19 Jan 2006 11:25:35 +0000 Message-ID: <43CF772F.8060806@apache.org> Date: Thu, 19 Jan 2006 12:25:35 +0100 From: Oleg Kalnichevski User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: HttpClient Project Subject: Re: FilePart Buffer Size of 4096 References: <5e9e13310601181810l450591b9t27fb51ec55c9e062@mail.gmail.com> In-Reply-To: <5e9e13310601181810l450591b9t27fb51ec55c9e062@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N S. Aden wrote: > There seems to be quite a lot of magic numbers being used in the HTTP > Client 3.0 code. One that caught my eye in particular is the hard > coded buffer size of 4096 in the FilePart class's sendData() method. > The content of the file stream is read in 4096 byte chunks and then > written to the output stream (socket). I was wondering if there is any > reason for doing this? Perhaps the buffer size should be configurable > property of the FilePart class? What is the reason one would want to change this value in the first place? This is just an intermediate read buffer, which should neither be too small (for performance rreasons) nor too big (for memory footprint reasons), but otherwise is *completely* irrelevant, because it has no bearing of what so ever on the internal socket send buffer (SO_SNDBUF) or IP packet size. Oleg > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org