[ https://issues.apache.org/jira/browse/LUCENE-1472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652221#action_12652221 ]
robert engels commented on LUCENE-1472: --------------------------------------- The last comment was tested using Java 5. It is my understanding that in Java 6, synchronization has become even cheaper - although object creation is cheaper as well - although 99% of the instantiation time of SimpleDateFormat is in the init code, not the object creation. I know there has been a lot of discussion of the "problems" with ThreadLocals... I've been a part of most of them :) - but for these very small objects, the typical ThreadLocal memory issues don't really apply. > DateTools.stringToDate() can cause lock contention under load > ------------------------------------------------------------- > > Key: LUCENE-1472 > URL: https://issues.apache.org/jira/browse/LUCENE-1472 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Affects Versions: 2.3.2 > Reporter: Mark Lassau > Priority: Minor > > Load testing our application (the JIRA Issue Tracker) has shown that threads > spend a lot of time blocked in DateTools.stringToDate(). > The stringToDate() method uses a singleton SimpleDateFormat object to parse > the dates. > Each call to SimpleDateFormat.parse() is *synchronized* because > SimpleDateFormat is not thread safe. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]