Creating SimpleDateFormat instances are very expensive as Daniel already said. I had similar issues with SDF in JSP pages formatting lots a date strings. Using a simple stack or kind of pool reusing the SDF instances turned out in a reasonable performance gain. That would also solve the doubt about concurrent use, wouldn't it?!
regards Simon On 7/22/06, Daniel Naber <[EMAIL PROTECTED]> wrote:
On Samstag 22 Juli 2006 07:58, Chris Hostetter wrote: > however i'm not sure if the > performance benefits of the static instances Daniel mentioned in his > commit will exist in a multithreaded app (the synchronization costs may > outway the instantiation costs) I created a micro benchmark with 2 to 4 threads and the new version was faster about a factor of at least 2. Regards Daniel -- http://www.danielnaber.de --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]