You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2014/04/24 01:08:16 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13979062#comment-13979062 ] 

Hadoop QA commented on ZOOKEEPER-1015:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12641564/ZOOKEEPER-1015.patch
  against trunk revision 1588584.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2058//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2058//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2058//console

This message is automatically generated.

> 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
>         Attachments: ZOOKEEPER-1015.patch
>
>
> 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)