>The APR on unix for apr_time_now() uses gettimeofday, and then we could >use the timeval's tv_sec, and on WIN32 GetTickCount, since all that >matters is the time interval.
gettimeofday may cost a little bit more and it's not necessary to have tv_usec for timeout count in seconds or minutes. For example on Linux time() cost 30% less than gettimeofday(). But Apache 1.3/2.0 allready set time in request, we need to use it, only IIS/iPlanet will need GetTicksCount or time() >> >The patch uses the semi-dynamic endpoint cache. One should >> set the high >> >enough worker.cachesize, and the number of opened channels >will drop >> >after worker.cache_timeout. >> >> Tell use more about worker.cache_timeout. >> > >Well, worker.ajp13.cache_timeout=seconds (15) by default, will >force all >the endpoints to be disconnected, which last access time exceeded the >set timeout, just like socket timeout does for found endpoint, and >socket itself. >That way we can handle the peek throughput relying only on the server, >without the need to make a dispatcher from 250->20 connections. ok, and default behaviour should make previous settings, ie worker.ajp13.cache_timeout=0 or no worker.ajp13.cache_timeout make the feature off. >> >Since IMO there was the general +1 for Jan's patch, here is >> >the original >> >with added endpoint timeout. >> >> time_t now = time(NULL); >> >> Is there faster alternative in apache ? time() is a consuming >> call, and I recall hack from a SGI boy to speed Apache 1.3 in >> avoiding use of time(), which are also in request_rec >> (r->request_time) in apache 1.3 (time_t) and 2.0 (apr_time_t) >> > >Don't know for unix if the time() or gettimeofday() is faster, >but using >gettimeofday we can retrieve the integer that can be handled more >efficiently then time_t. On WIN32 we should stick to >GetTickCount, cause >its much faster, since there's no need to go to the MSVCRT, or do the >lenghty TZ conversions. On unix, time_t stick to int or long... -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
