You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Michi Mutsuzaki (JIRA)" <ji...@apache.org> on 2014/04/23 22:50:16 UTC
[jira] [Updated] (ZOOKEEPER-1015) DateFormat.getDateTimeInstance()
is very expensive, we can cache it to improve performance
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michi Mutsuzaki updated ZOOKEEPER-1015:
---------------------------------------
Assignee: Bill Havanki
> DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1015
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1015
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.3.2
> Reporter: Xiaoming Shi
> Assignee: Bill Havanki
> Labels: newbie
>
> In the file
> {noformat}
> ./zookeeper-3.3.2/src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java line:103
> {noformat}
> DateFormat.getDateTimeInstance() is called many times in the for loop. We can cache the result and improve the performance
> This is similar to the Apache bug https://issues.apache.org/bugzilla/show_bug.cgi?id=48778
> Similar code can be found:
> {noformat}
> ./zookeeper-3.3.2/src/java/main/org/apache/zookeeper/server/TraceFormatter.java
> ./zookeeper-3.3.2/src/java/main/org/apache/zookeeper/server/LogFormatter.java
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)