apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bri...@apache.org>
Subject pollset initialization within apr_file_open()?
Date Sun, 03 Jul 2005 23:27:05 GMT
I just did some performance profiling of httpd-2.1 for the first time  
in a long while.

One of the odd things I noticed is that apr_file_open() appears to  
spend half its time
in a call to apr_pollset_create().

The pollset creation can be expensive, especially on platforms where  
it's implemented
using /dev/poll or kqueue.  And as far as I can tell. the pollset is  
only used in the special
case of apr_wait_for_io_or_timeout() where the caller wants to wait  
on a file.

I'm inclined to think that the pollset within an apr_file_t should be  
created only
if needed--e.g., with lazy initialization triggered via an  
function.  Such a function wouldn't be thread-safe without some extra  
of course, but that's true of many of the apr_file_* and  
apr_pollset_* operations

Anybody have thoughts on this?


View raw message