Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6652519

JAXP issue 48 : Performance Issue with Xalan Transformer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: saaj1.2, 6
    • Fix Version/s: 1.4.0
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.4
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        It has been observed that when using the Transfomer to convert a StreamSource to
        DOMResult, the performance of Transform gets worse as the size of the
        inputstream increases.

        How to Reproduce :

        The issue manifests in the form of Poor performance of SAAJ for Large Payloads.
        SAAJ RI depends on the Transformer.

         import javax.xml.soap.*;

               long start = System.currentTimeMillis();
               MessageFactory mf =
        MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
               MimeHeaders hdrs = new MimeHeaders();
               hdrs.addHeader("Content-Type", "application/soap+xml");
               SOAPMessage sm = mf.createMessage(hdrs, new FileInputStream(new
        File("msgAttach.xml")));
               SOAPBody body = sm.getSOAPBody();
               long end = System.currentTimeMillis();
               System.out.println("Total Time Taken=" + (end - start)/1000);

        Here msgAttach.xml is basically a SOAP Envelope with a large SOAPBody

        ------------
        Profiling has shown that 99.5% of the time is being spent on in
        CharacterDataImpl.appendData()

        com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.characters(char[], int,
        int) is calling
        com.sun.org.apache.xerces.internal.dom.CharacterDataImpl.appendData(String) and
        99.5% of time is spent here.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                joehw Joe Wang
                Reporter:
                joehw Joe Wang
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: