On 02/08/2010 23:33, Caldarale, Charles R wrote:
>> From: Mark Thomas [mailto:[email protected]]
>> 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.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to