OpenJPA
  1. OpenJPA
  2. OPENJPA-1953

Copying data from inputStream to OuputStream needs appropriate buffer size

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: lib
    • Labels:
      None

      Description

      In the file:
      ./apache-openjpa-2.1.0-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipStreamMetaDataIterator.java line : 119

      The buffer size is fixed as 1024 bytes. With the size of the data varies, the performance can be damaged a lot.

      We need an appropriate buffer size which depends on the size of the data to be copied.

      This is the same as the Appache Bug (https://issues.apache.org/bugzilla/show_bug.cgi?id=32546)

        Activity

        Rick Curtis made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Hide
        Rick Curtis added a comment -

        I dug into this on this afternoon and I don't see a way that we can do something similar to what was mentioned in the provided link. ZipStreamMetaDataIterator.getContent() is used to read the entire contents of a file which we don't know the length of. On top of that, I don't see this being an area where a large amount of work is driving through. We might be able to optimize this path, but at very little benefit. I'm going to close this JIRA as will no fix, but feel free to reopen if you disagree.

        Thanks,
        Rick

        Show
        Rick Curtis added a comment - I dug into this on this afternoon and I don't see a way that we can do something similar to what was mentioned in the provided link. ZipStreamMetaDataIterator.getContent() is used to read the entire contents of a file which we don't know the length of. On top of that, I don't see this being an area where a large amount of work is driving through. We might be able to optimize this path, but at very little benefit. I'm going to close this JIRA as will no fix, but feel free to reopen if you disagree. Thanks, Rick
        Rick Curtis made changes -
        Assignee Rick Curtis [ curtisr7 ]
        Michael Dick made changes -
        Field Original Value New Value
        Fix Version/s 2.2.0 [ 12315910 ]
        Hide
        Michael Dick added a comment -

        Assigning to 2.2.0.

        Show
        Michael Dick added a comment - Assigning to 2.2.0.
        Xiaoming Shi created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development