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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        46d 10h 33m 1 Knut Anders Hatlen 13/Apr/11 19:12
        Resolved Resolved Closed Closed
        795d 14h 7m 1 Knut Anders Hatlen 17/Jun/13 09:19
        Gavin made changes -
        Workflow jira [ 12600074 ] Default workflow, editable Closed status [ 12801010 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        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.
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.2 [ 12316362 ]
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info [Patch Available]
        Resolution Fixed [ 1 ]
        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.
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Fix Version/s 10.8.1.0 [ 12315561 ]
        Lily Wei made changes -
        Labels derby_triage10_8
        Bug behavior facts [Performance]
        Assignee Dave Brosius [ dbrosius ]
        Issue & fix info [Patch Available]
        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.
        Dave Brosius made changes -
        Field Original Value New Value
        Attachment use_stringbuffer.diff [ 12472033 ]
        Dave Brosius created issue -

          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