lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Naber (JIRA)" <>
Subject [jira] Commented: (LUCENE-1472) DateTools.stringToDate() can cause lock contention under load
Date Mon, 01 Dec 2008 18:29:44 GMT


Daniel Naber commented on LUCENE-1472:

Could you try changing the code to create a new object every time and then run your load test
again? We original did that but it was slower, at least according to this commit comment from
two years ago:

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

> DateTools.stringToDate() can cause lock contention under load
> -------------------------------------------------------------
>                 Key: LUCENE-1472
>                 URL:
>             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:
For additional commands, e-mail:

View raw message