tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: getCurrentTimeMillis definition in JDBCAccessValve
Date Mon, 02 Aug 2010 22:46:05 GMT
On 02/08/2010 23:33, Caldarale, Charles R wrote:
>> From: Mark Thomas []
>> Subject: Re: getCurrentTimeMillis definition in JDBCAccessValve
>> Speed. This way we only generate a new date string every 1s.
> But why generate the Date instance at all?  Since System.currentTimeMillis() is being
called every time, why not return that value, rather than ever creating a Date object with
a specific time just to return the time value it was constructed with?  The Date object itself
is not used outside the scope of this one method.

You no the mantra by now. If you can see room for improvement, patches
are always welcome. ;)

Note that there are some tests in the test tree you can use to see what
impact your changes have on performance.


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

View raw message