lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer" <simon.willna...@googlemail.com>
Subject Re: svn commit: r424449 - /lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java
Date Sat, 22 Jul 2006 12:14:17 GMT
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 <lucenelist2005@danielnaber.de> 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: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message