httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: [PATCH] performance patch for mod_log_config
Date Mon, 10 Sep 2001 05:06:34 GMT
William A. Rowe, Jr. wrote:

>Is this the right place to be caching, or should this become a straightforward
>optimization to apr's time.c functions?  I'd think the advantages are many for
>keeping 15 current seconds in apr, and would pay off across the board.  Within
>apr, we can always recalculate just the ms as well, for fun.
I think putting it in APR would work.  The one limitation I can think of
is that adding the cache in apr_explode_localtime() itself wouldn't be a
win because we'd have to add the overhead of a gettimeofday() call to
check whether the supplied time was indeed current (and thus susceptible
to caching).

But we could do something like this:

  apr_status_t  apr_explode_current_localtime(apr_exploded_time_t *t);

and presumably its GMT counterpart,

  apr_status_t  apr_explode_current_gmt(apr_exploded_time_t *t);

If that interface looks useful, I'll resubmit the patch in a form that
adds these functions to APR and calls them from mod_log_config.


View raw message