> > 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.
Ryan, APR does have an impact on performance. Every function call impacts performance and APR adds several function calls as compared to a native system call. We live with this because we need Apache 2 to run on multiple platforms. There is no need to be pedantic about using the same API within APR. Using apr_poll WILL add instructions. Give me an implementation and I'll compare the two. And as Jeff has already pointed out, using apr_poll in this case will increase complexity of the code. Bill
