apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: apr-util/buckets apr_buckets_file.c
Date Thu, 05 Jul 2001 01:41:49 GMT
On 5 Jul 2001 rbb@apache.org wrote:

>   We need to ALWAYS do the seek if we are reading from the file.  This is
>   unfortunate from a performance perspective, but right now, I can have an
>   offset of 0 in the bucket, but be referring to a file that has been read
>   from.  If we don't seek before reading from the bucket, we get invalid
>   data.
>
>        /* Handle offset ... */
>   -    if (fileoffset) {
>            rv = apr_file_seek(f, APR_SET, &fileoffset);
>            if (rv != APR_SUCCESS) {
>                free(buf);
>                return rv;
>   -        }
>        }

Hoooo... good catch.  I don't know why I never thought of that before.
<sigh>  You're right that it sucks for performance, but then again if we
get to this point we've given up on mmaping the file so we're in the
"worst case" performance scenario anyway.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message