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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.3.2
    • None
    • server
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: