Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-431

Improve performance by removing StringBuffer where possible

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 0.9.15
    • None
    • None
    • any

    Description

      StringBuffer is used in some local variables. The newer StringBuilder alternative will improve the performance slightly in such cases.

      E.g.in FileNamePattern

      public String convert(Object o) {
      Converter<Object> p = headTokenConverter;
      StringBuffer buf = new StringBuffer();
      while (p != null)

      { buf.append(p.convert(o)); p = p.getNext(); }

      return buf.toString();
      }

      should change to use

      StringBuilder buf = new StringBuilder();

      Attachments

        Activity

          People

            logback-dev Logback dev list
            rickb Rick Beton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: