You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jean-Jacques Clar <JJ...@novell.com> on 2003/03/03 20:03:38 UTC

[PATCH] optimization in ap_meets_conditions()

The function ap_meets_conditions() is doing unnecessary calls to 
apr_time_now() and apr_time_sec().
 
Since the variables (mtime) has its target value in second, it should 
be possible to use r->request_time instead of calling apr_time_now().
I did not see cases where the delay between a call to
read_request_time() 
and ap_meets_conditions() was greater then 1 second.
 
Also, if r->request_time is not available, it should just call
time(NULL) 
instead of calling apr_time_now() followed by a call to
apr_time_sec().
 
Thank you,
 
Jean-Jacques