apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: cvs commit: apr-util/buckets apr_buckets_file.c
Date Thu, 05 Jul 2001 01:42:42 GMT

> >   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.

I only caught it because it exposed a bug in mod_pop3.  :-)

Ryan

_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------


Mime
View raw message