Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1014

DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.3.2
    • Fix Version/s: None
    • Component/s: server
    • Labels:
      None

      Description

      In the file:

      ./zookeeper-3.3.2/src/java/main/org/apache/zookeeper/server/TraceFormatter.java
      

      DateFormat.getDateTimeInstance() is called in the while loop. We can cache the return value, and improve performance.

      This is similar to the Apache Bug https://issues.apache.org/bugzilla/show_bug.cgi?id=48778

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nancyesmis Xiaoming Shi
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: