From dev-return-3010-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Thu Jul 05 14:28:08 2001 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 88263 invoked by uid 500); 5 Jul 2001 14:28:07 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 88221 invoked from network); 5 Jul 2001 14:28:06 -0000 Message-ID: <00a801c1055f$b41f59b0$04000100@sashimi> From: "Bill Stoddard" To: "APR Development List" References: Subject: Re: cvs commit: apr-util/buckets apr_buckets_file.c Date: Thu, 5 Jul 2001 10:35:08 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > PS: The common case for this segment of code is that the offset will be > non-zero, since it reads in from a file in 8KB hunks, incrementing the > offset each time. So removing the conditional actually (very slightly) > improves the performance of this section for the common case. Only the > case where offset == 0 might be negatively impacted. > > --Cliff Maybe there is something very fundamental that I a missing here. Each 8K chunk that is read causes the system to increment its file pointer for that open fd. You should not need to call seek() to do something the system is already doing for you under the covers. Bill