Derby
  1. Derby
  2. DERBY-5071

[patch] use string buffers when building strings in loops

    Details

    • Urgency:
      Low
    • Bug behavior facts:
      Performance

      Description

      Various spots in code builds up strings in loops.

      This causes n extra StringBuffer allocations and n extra String allocations

      patch replaces with direct StringBuffer use.

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        [bulk update] Close all resolved issues that haven't been updated for more than one year.

        Show
        Knut Anders Hatlen added a comment - [bulk update] Close all resolved issues that haven't been updated for more than one year.
        Hide
        Knut Anders Hatlen added a comment -

        It looks like all the planned work on this issue is completed. Marking as resolved.

        Show
        Knut Anders Hatlen added a comment - It looks like all the planned work on this issue is completed. Marking as resolved.
        Hide
        Lily Wei added a comment -

        I've committed with revision 1075568. Thanks, Dave.

        Show
        Lily Wei added a comment - I've committed with revision 1075568. Thanks, Dave.
        Hide
        Dave Brosius added a comment -

        these aren't fixed lengths, just initial sizes, it keeps the number of buffer reallocations down.

        Show
        Dave Brosius added a comment - these aren't fixed lengths, just initial sizes, it keeps the number of buffer reallocations down.
        Hide
        Lily Wei added a comment -

        For statementduration and ErrorLogReader, StringBuffer is fix length. Will using constant for the fix length StringBuffer be more desirable?

        Show
        Lily Wei added a comment - For statementduration and ErrorLogReader, StringBuffer is fix length. Will using constant for the fix length StringBuffer be more desirable?
        Hide
        Lily Wei added a comment -

        Suites.all and derbyall run clean with this patch. If there is no objection, I will commit this patch soon.

        Show
        Lily Wei added a comment - Suites.all and derbyall run clean with this patch. If there is no objection, I will commit this patch soon.

          People

          • Assignee:
            Dave Brosius
            Reporter:
            Dave Brosius
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development