On Wed, 3 Jul 2002, Ian Holsman wrote: > Bill Stoddard wrote: > >>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > <snip> > > > I'd rather pay the maintenance overhead on this code. BTW, testing on AIX > > yields up to a 9% increase in throughput with this patch (serving 500 byte > > file out of mod_mem_cache). Huge win for a small change! > > > > Bill > > > > > fantastic speed improvement that rocks. > > like Brian said the APR is to provide a consistent usable interface to > the outside world. if we choose to implement the timeout using the > poll() function instead of a select() function than that is perfectly > valid.
If that was all we were doing, I would agree with you. But `Jeff's patch implements BOTH select and poll with an #ifdef, because not every platform has poll(). This is exactly the reason for having apr_poll(), and not using it is stupid. If the argument is performance, then back it up with numbers. If the performance is as bad as everybody seems to think it is, then fix the functions. If the problem is the API itself, then fix the API. > another case in which we do the SAME THING is how we implement > sendfile() on machines which don't have it. we don't use apr_file_writev > we use another standard system call writev It isn't the same thing. First of all, according to my reading of the code, we don't implement sendfile at all if the platform doesn't suppoort it. Apache itself does, but it uses sendv. Second of all, as I said above I wouldn't have a problem with the approach if it didn't require #ifdef's to implement two options to do the same code, which is the exact problem APR is supposed to solve. Even worse, is that we are making decisions without ANY numbers to back up what people aare saying. I am planning to do some measurements on Friday to look at the REAL numbers before we can make a decision. If the numbers are much worse for apr_poll, then I have some thoughts on how to improve that API to fix the performance problems. Ryan _______________________________________________________________________________ Ryan Bloom [EMAIL PROTECTED] 550 Jean St Oakland CA 94610 -------------------------------------------------------------------------------
