tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <>
Subject Re: 6.x feature wishlist
Date Tue, 07 Aug 2007 12:42:25 GMT
Tim Funk wrote:
>> 11.Timestamps & System.currentTimeMillis
>>   System.currentTimeMillis is invoked everywhere during the chain of 
>> events for a HTTP requests, even though most dates only need 
>> precision down to the second.
>>   I've received feedback that this could be improved by keeping a 
>> time service, that updates a timestamp every second, and therefor 
>> reduces the number of system calls
>>   I think we would need to prove the theory before committing to the 
>> implementation, but that should be pretty easy
System.currentTimeMillis() is *very* fast.  [System.nanoTime() is not 
necessarily and can be relatively slow on some hardware.]

Many algorithms used to format System.currentTimeMillis() into a human 
readable date format are fairly slow.  I'm not sure what Tomcat is 
currently using here, but that would be the only thing I'd be concerned 
about.  It would seem sufficient just to make sure this conversion is 
efficient and/or not called with any ridiculous frequency.

Jess Holle

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message