Derby
  1. Derby
  2. DERBY-212 Optimize some specific methods in Network Server to improve performance
  3. DERBY-816

In DDMWriter and DDMReader, use system routines in java.util.Arrays and System.arrayCopy

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6
    • Fix Version/s: None
    • Component/s: Network Server
    • Labels:
      None
    • Bug behavior facts:
      Performance

      Description

      Reported by Kathey Marsden in DERBY-212:

      In DDMWriter and DDMReader, use System Routines in
      java.util.Arrays and System.arrayCopy instead of
      writing code to do functions like copy arrays and
      pad strings.

      1. derby-816.diff
        2 kB
        Dyre Tjeldvoll
      2. derby-816.stat
        0.6 kB
        Dyre Tjeldvoll
      3. derbyall_report.txt
        22 kB
        Dyre Tjeldvoll

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        There is little value in fixing this. And it ain't broken...

        Show
        Knut Anders Hatlen added a comment - There is little value in fixing this. And it ain't broken...
        Hide
        Knut Anders Hatlen added a comment -

        I agree with Dyre and Bryan that there's little value in these changes. I guess DDMReader and DDMWriter have been cleaned up after DERBY-212 was filed, but the issue was not updated. I suggest we close this sub-task as "won't fix".

        Show
        Knut Anders Hatlen added a comment - I agree with Dyre and Bryan that there's little value in these changes. I guess DDMReader and DDMWriter have been cleaned up after DERBY-212 was filed, but the issue was not updated. I suggest we close this sub-task as "won't fix".
        Hide
        Bryan Pendleton added a comment -

        I don't think there's much point in fiddling with padScalarStreamForError(), since Tomohito is working on removing that routine as part of DERBY-326. I don't have much opinion on the bigDecimal changes, but if it doesn't improve performance significantly, then my reaction is not to bother.

        Show
        Bryan Pendleton added a comment - I don't think there's much point in fiddling with padScalarStreamForError(), since Tomohito is working on removing that routine as part of DERBY-326 . I don't have much opinion on the bigDecimal changes, but if it doesn't improve performance significantly, then my reaction is not to bother.
        Hide
        Dyre Tjeldvoll added a comment -

        I have attached a patch, but I think I'm voting 0 for it. It works, but I'm not sure that it makes the code more readable,
        and I doubt that it will significantly affect performance... I'll let the committers decide.

        Show
        Dyre Tjeldvoll added a comment - I have attached a patch, but I think I'm voting 0 for it. It works, but I'm not sure that it makes the code more readable, and I doubt that it will significantly affect performance... I'll let the committers decide.
        Hide
        Knut Anders Hatlen added a comment -

        It seems like System.arraycopy is used all places where it potentially could be used. Found nothing more to change in DDMReader. In DDMWriter, I searched for "for" and "while" and found three places where Arrays.fill could be used for padding.

        I'm adding component "Newcomer", as it's a simple case of calculating from index and to index, and replacing the for loops with Arrays.fill().

        Show
        Knut Anders Hatlen added a comment - It seems like System.arraycopy is used all places where it potentially could be used. Found nothing more to change in DDMReader. In DDMWriter, I searched for "for" and "while" and found three places where Arrays.fill could be used for padding. I'm adding component "Newcomer", as it's a simple case of calculating from index and to index, and replacing the for loops with Arrays.fill().

          People

          • Assignee:
            Dyre Tjeldvoll
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development