lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: svn commit: r424449 - /lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java
Date Sat, 22 Jul 2006 05:58:28 GMT

: I remember reading somewhere (SDF javadoc?) that SDF instances are not
: thread-safe.  I take it that means class instances could mean trouble.

correct, but all usages of the static formaters in this patch seem to be
synchronized, so it's probably not an issue -- 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)

: Don't re-create SimpleDateFormat objects, use static ones instead. Gives
: about a 2x performance increase in a micro benchmark.



-Hoss


---------------------------------------------------------------------
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