[ 
https://issues.apache.org/jira/browse/AXIS2-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rich Scheuerle resolved AXIS2-2508.
-----------------------------------

    Resolution: Fixed

Committed revision 527612.

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to