You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Sandro Martini (JIRA)" <ji...@apache.org> on 2011/03/02 17:12:36 UTC

[jira] Updated: (PIVOT-708) DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance

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

Sandro Martini updated PIVOT-708:
---------------------------------

      Priority: Minor  (was: Major)
      Assignee: Sandro Martini
    Issue Type: Improvement  (was: Bug)

DateFormat and related classes are not Thread safe, so if it's used in a single thread the fix is trivial and we can cache it, otherwise I have to synchronize access to it, but we have to see if it makes sense here.
I'll try the simpler fix as soon as possible, even with a multi-thread test case (if it's the case).

> DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance
> ------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-708
>                 URL: https://issues.apache.org/jira/browse/PIVOT-708
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Xiaoming Shi
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>
> In the file 
> ./apache-pivot-2.0-src/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java 
> line:281
> DateFormat.getDateTimeInstance() is created in the function. We can cache the result by adding a static class field.
> It is similar to the Apache Bug https://issues.apache.org/bugzilla/show_bug.cgi?id=48778

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira