httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: usec vs sec
Date Wed, 06 Sep 2000 14:56:34 GMT

> The big question is what the time is used for. The most obvious two places
> are the log files, and HTTP response headers, both of which quote a time
> to one second resolution anyway. Perhaps the MPM could maintain a "current
> time" variable, updated once per second? (Better still, we could
> pre-compose timestamp strings in the appropriate format, cutting the CPU
> overhead of generating a header?)

Back when work on 2.0 was first starting, I made a quick hack to use a
timing thread in each child process.  This thread basically updated it's
time once a second and when another thread needed the time, it asked that
thread.  This turned out to require the same amount of time as doing the
gettimeofday() calls.  Granted, my hack was never optimized at all, but
neither was the rest of 2.0.

I really think we are optimizing in the wrong places in 2.0.  There are
all sorts of interactions that should be optimizable, but time is one of
the ones I would try to tackle last.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message