Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1444

Copying data from inputStream to OuputStream needs appropriate buffer size

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.4
    • Fix Version/s: None
    • Component/s: container system
    • Labels:
      None

      Description

      In the file:

      ./openejb-3.1.4-src/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java line:149

      It uses a fixed buffer size as 4096.

      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.

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

      Similar code can be found in the files:
      ./openejb-3.1.4-src/container/openejb-core/src/main/java/org/apache/openejb/util/JarExtractor.java
      ./openejb-3.1.4-src/container/openejb-core/src/main/java/org/apache/openejb/util/JuliLogStreamFactory.java
      ./openejb-3.1.4-src/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java
      ./openejb-3.1.4-src/container/openejb-core/src/main/java/org/apache/openejb/util/Pipe.java
      ./openejb-3.1.4-src/container/openejb-javaagent/src/main/java/org/apache/openejb/javaagent/Agent.java

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: