axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Scheuerle (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-2508) Performance Improvement: Change SOAPBuilder to use InputStream instead of Reader
Date Wed, 11 Apr 2007 18:50:32 GMT
Performance Improvement: Change SOAPBuilder to use InputStream instead of Reader
--------------------------------------------------------------------------------

                 Key: AXIS2-2508
                 URL: https://issues.apache.org/jira/browse/AXIS2-2508
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
            Reporter: Rich Scheuerle


During some performance testing, we discovered that the SOAPBuilder code converts an InputStream
into a Reader.

streamReader = StAXUtils.createXMLStreamReader(BuilderUtil.getReader(inputStream, charSetEncoding));

I wholeheartedly agree with the new code structure to use the BOM information that is embedded
in the InputStream.  
But we probably shouldn't convert the entire InputStream into a Reader.

So I have created an improvement on the current solution.

Here is the same snippet of code in the new solution:

           // Get the actual encoding by looking at the BOM of the InputStream
           PushbackInputStream pis = BuilderUtil.getPushbackInputStream(inputStream);
           String actualCharSetEncoding = BuilderUtil.getCharSetEncoding(pis, charSetEncoding);
                    
           // Get the XMLStreamReader for this input stream
           streamReader = StAXUtils.createXMLStreamReader(pis, actualCharSetEncoding);

This new solution still uses BOM detection, but it also does not require a full translation
into a Reader.

I have completed the testing for this change, and will be committing it shortly.
I don't believe that this is a controversal change, but if anyone disagrees please contact
me.



  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message