Axis2
  1. Axis2
  2. AXIS2-4978

Copying data from inputStream to OuputStream needs appropriate buffer size

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: None
    • Component/s: modules
    • Labels:
      None

      Description

      In the file

      ./axis2-1.5.4/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java line:323

      The buffer size is fixed at 1024 bytes.

      To copy 10M data with 1024-byte buffer it takes 338,591,180 nano-second, while it takes 105,384,689 nano-second with a 10240-byte buffer.

      Similar code can be found at:

      ./axis2-1.5.4/modules/kernel/src/org/apache/axis2/util/IOUtils.java
      ./axis2-1.5.4/modules/kernel/src/org/apache/axis2/classloader/IoUtil.java
      ./axis2-1.5.4/modules/kernel/src/org/apache/axis2/classloader/JarResourceLocation.java
      ./axis2-1.5.4/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java

      This is similar to the Apache Bug https://issues.apache.org/bugzilla/show_bug.cgi?id=32546

      1. AXIS2-4978.patch
        10 kB
        Ranjana Prasad

        Activity

        Xiaoming Shi created issue -
        Andreas Veithen made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Ranjana Prasad made changes -
        Attachment AXIS2-4978.patch [ 12520279 ]
        Hide
        Ranjana Prasad added a comment -

        There is a new option has been introduced to set buffer size in Maven plug-in. Also I refactored hard coded buffer values. Please review my patch and provide your feedback.

        Show
        Ranjana Prasad added a comment - There is a new option has been introduced to set buffer size in Maven plug-in. Also I refactored hard coded buffer values. Please review my patch and provide your feedback.
        Hide
        Sagara Gunathunga added a comment -

        Patch available on r1307411.

        Show
        Sagara Gunathunga added a comment - Patch available on r1307411.
        Hide
        Hudson added a comment -

        Integrated in Axis2 #1319 (See https://builds.apache.org/job/Axis2/1319/)
        Applied patch for AXIS2-4978. (Revision 1307411)

        Result = SUCCESS
        sagara :
        Files :

        • /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java
        • /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/classloader/IoUtil.java
        • /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/classloader/JarResourceLocation.java
        • /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/IOUtils.java
        • /axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
        • /axis/axis2/java/core/trunk/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java
        • /axis/axis2/java/core/trunk/modules/tool/simple-server-maven-plugin/src/main/java/org/apache/axis2/maven2/server/SimpleHttpServerMojo.java
        • /axis/axis2/java/core/trunk/modules/tool/simple-server-maven-plugin/src/main/java/org/apache/axis2/maven2/server/util/RepoHelper.java
        Show
        Hudson added a comment - Integrated in Axis2 #1319 (See https://builds.apache.org/job/Axis2/1319/ ) Applied patch for AXIS2-4978 . (Revision 1307411) Result = SUCCESS sagara : Files : /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/classloader/IoUtil.java /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/classloader/JarResourceLocation.java /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/IOUtils.java /axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java /axis/axis2/java/core/trunk/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java /axis/axis2/java/core/trunk/modules/tool/simple-server-maven-plugin/src/main/java/org/apache/axis2/maven2/server/SimpleHttpServerMojo.java /axis/axis2/java/core/trunk/modules/tool/simple-server-maven-plugin/src/main/java/org/apache/axis2/maven2/server/util/RepoHelper.java
        Sagara Gunathunga made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Xiaoming Shi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development