apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <...@covalent.net>
Subject RE: [PATCH] speed up network timeout processing
Date Wed, 03 Jul 2002 15:26:00 GMT
> From: Bill Stoddard [mailto:bill@wstoddard.com]
> 
> 
> > > From: trawick@rdu88-250-182.nc.rr.com [mailto:trawick@rdu88-250-
> > >
> > > A little bird told me that FD_ZERO() burns lots of cycles in
> > > apr_wait_for_io_or_timeout().  It turns out that this is an easy
> > > conversion to poll(), which doesn't have such overhead in the
> > > interface.
> > >
> > > This works for me with some testing (timeouts on read and write
work
> > > for me).
> >
> > Can we remove the #ifdef's by just using apr_poll here?
> >
> > Ryan
> 
> I'd prefer not to do that. calling apr_poll will just add extra
function
> call overhead. This code is pretty simple (ie, the #ifdef does not
> signicantly impact code readability).

This is bogus.  If apr_poll is so heavy-weight that APR can't use it,
then it is just too heavy-weight.  Avoiding the function doesn't do
anything other than prove that apr_poll is not useful in its current
form.  FIX THE PROBLEM!  It is completely insane to re-write the
select/poll abstraction in two different parts of APR.  If APR can't use
apr_poll, then the API should be removed, because it doesn't perform
well enough for applications to use.

Ryan



Mime
View raw message