Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2544

Performance degradation in attachment logic in CXF 2.2.4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.4
    • 2.2.5
    • None
    • None
    • Moderate

    Description

      AttachmentDeserializer attaches a DelegatingInputStream to the message, which contains the attachment body. The performance of this InputStream has been significantly degraded from CXF 2.2.2 to CXF 2.2.4. For example, a 55 megabyte file used to take around three seconds to parse - now it takes over one minute.

      I've attached a performance test which demonstrates the issue, using an 8 megabyte file. In CXF v2.2.2, this test takes a fraction of a second to run. In CXF v2.2.4, this test takes about 10 seconds on my machine.

      I tried to track down the cause of the degradation. AttachmentDeserializer line 206 calls "new InternetHeaders(stream)" which takes a long time to complete. Since CXF v2.2.2 and CXF v2.2.4 use the same version of this InternetHeaders class, I believe it must be a change in the way the stream is being put together.

      Attachments

        1. CxfBug1.java
          4 kB
          aaron pieper

        Activity

          People

            dkulp Daniel Kulp
            piepera aaron pieper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: