Infact, I tried this out yesterday (having the one global_time variable), it
gives me around 3-4% improvement. But, occasionally I do get some
un-conforming results, and I'm trying to figure out if it's because of the
time stamp.
You probably need to mutex updates to your global variable, which will
probably suck out most of your performance gains.
Anyways, moving away from the time(), here's what I've been thinking..I'm
sure many of you have gone through this list, so, can you please give me
your feedback regarding the following :
1. Why we need to do the apr_stat() for static files each time the request
comes in - can it be done during the module_init() phase, and the values put
in a array of some sort. ?.
Files change. Why not use mod_file_cache? It will (or should if it does
not have a bug) eliminate the stat. Or we could spend time rewriting
code to just do an open (followed by a less expensive fstat) rather than
a stat/open.
Bill