You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org> on 2006/01/16 15:47:20 UTC

[jira] Updated: (DERBY-816) In DDMWriter and DDMReader, use system routines in java.util.Arrays and System.arrayCopy

     [ http://issues.apache.org/jira/browse/DERBY-816?page=all ]

Knut Anders Hatlen updated DERBY-816:
-------------------------------------

    Component: Network Server
               Newcomer
               Performance
     Priority: Trivial  (was: Minor)

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().

> In DDMWriter and DDMReader, use system routines in java.util.Arrays and System.arrayCopy
> ----------------------------------------------------------------------------------------
>
>          Key: DERBY-816
>          URL: http://issues.apache.org/jira/browse/DERBY-816
>      Project: Derby
>         Type: Sub-task
>   Components: Network Server, Newcomer, Performance
>     Versions: 10.1.1.0, 10.1.1.1, 10.1.1.2, 10.1.2.0, 10.1.2.1, 10.2.0.0, 10.1.3.0, 10.1.2.2
>     Reporter: Knut Anders Hatlen
>     Priority: Trivial
>      Fix For: 10.2.0.0

>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Updated: (DERBY-816) In DDMWriter and DDMReader, use system routines in java.util.Arrays and System.arrayCopy

Posted by Andrew McIntyre <mc...@gmail.com>.
On Jan 18, 2006, at 7:57 AM, Anders Morken wrote:

> Created a sub-task of DERBY-212 in JIRA for these patches, DERBY-823.
> For some reason it's flagged as a "Major" priority, which is obviously
> wrong, but I can't change it.

Hi Anders,

This is because you had not yet requested to be a member of the derby- 
developers JIRA group. Only members of the derby-developers group are  
allowed to edit JIRA entries.

I went ahead and added you to the group.

andrew

Re: [jira] Updated: (DERBY-816) In DDMWriter and DDMReader, use system routines in java.util.Arrays and System.arrayCopy

Posted by Anders Morken <an...@stud.ntnu.no>.
Anders Morken:
> Bryan Pendleton:
> > Knut Anders Hatlen (JIRA) wrote:
> > >     [ http://issues.apache.org/jira/browse/DERBY-816?page=all ]
> > 
> > I believe there are also some places in the client code where it
> > could be beneficial to use System.arraycopy and/or Arrays.fill.
> > For example, in Reply.compressBLayerData() in Reply.java there is
> > such a case:
> 
> This seemed like something suitable for a novice, so I've picked up a
> couple of instances of this (So far in Reply.java and Request.java), and
> changed them to use System.arrayCopy() and Arrays.fill(). I'm running
> tests now, and unless it breaks or I find more stuff to mess with I'll
> stick a patch in JIRA before going to bed. =)

Created a sub-task of DERBY-212 in JIRA for these patches, DERBY-823.
For some reason it's flagged as a "Major" priority, which is obviously
wrong, but I can't change it.

I hope they don't break anything. Sanity checking would be appreciated,
I made the changes without understanding any of the code of the code
surrounding the patches. =)

-- 
Anders Morken

My opinions may have changed, but not the fact that I am right!

Re: [jira] Updated: (DERBY-816) In DDMWriter and DDMReader, use system routines in java.util.Arrays and System.arrayCopy

Posted by Anders Morken <an...@stud.ntnu.no>.
Bryan Pendleton:
> Knut Anders Hatlen (JIRA) wrote:
> >     [ http://issues.apache.org/jira/browse/DERBY-816?page=all ]
> 
> I believe there are also some places in the client code where it
> could be beneficial to use System.arraycopy and/or Arrays.fill.
> For example, in Reply.compressBLayerData() in Reply.java there is
> such a case:

This seemed like something suitable for a novice, so I've picked up a
couple of instances of this (So far in Reply.java and Request.java), and
changed them to use System.arrayCopy() and Arrays.fill(). I'm running
tests now, and unless it breaks or I find more stuff to mess with I'll
stick a patch in JIRA before going to bed. =)

-- 
Anders Morken

My opinions may have changed, but not the fact that I am right!

Re: [jira] Updated: (DERBY-816) In DDMWriter and DDMReader, use system routines in java.util.Arrays and System.arrayCopy

Posted by Bryan Pendleton <bp...@amberpoint.com>.
Knut Anders Hatlen (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/DERBY-816?page=all ]

I believe there are also some places in the client code where it
could be beneficial to use System.arraycopy and/or Arrays.fill.
For example, in Reply.compressBLayerData() in Reply.java there is
such a case:

            // perform the compress
            for (int j = 0; j < bytesToShift; j++) {
                buffer_[tempPos + shiftSize] = buffer_[tempPos];
                tempPos--;
            }

thanks,

bryan