hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HTTPCLIENT-659) DateUtils should cache SimpleDateFormat
Date Thu, 18 Oct 2007 15:54:50 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Oleg Kalnichevski updated HTTPCLIENT-659:

    Attachment: 20071018-001-dateutils.patch

A small variation on the Daniel's original patch. HashMaps containing date format instances
are now softly referecned by the thread local to allow for their garbage-collection. Please

If I hear no complaints, I'll check in the patch in a few days.


> DateUtils should cache SimpleDateFormat
> ---------------------------------------
>                 Key: HTTPCLIENT-659
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-659
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpCookie
>            Reporter: Daniel Müller
>            Priority: Minor
>             Fix For: 4.0 Alpha 2
>         Attachments: 20071018-001-dateutils.patch, org.apache.http.util.patch
> DateUtils create a SimpleDateFormat for each invocation of #formatDate and #parseDate.
This can be optimized if SimpleDateFormat instances are cached. Since SimpleDateFormat is
not threadsafe, the cache must be threadlocal.

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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org

View raw message