Hi Andreas thanks for your reply,
the XML is very little (ranging from 50 to 250 nodes with size less than
10Kb) that change it with a BufferedReader or even using a DOMSource (I
already parse XML elsewhere) not give me a real gain.
Maybe a 1 or 2 seconds but I'm not sure because could be depends on
different loads on server and so isn't really noticeable.
I changed my code anyway
 
Paolo
 
>Hi
 
>Sorry for the late reply.
 
>As Jeremias already indicated, profiling is one option. There are  
>various tools and there is lots of documentation available on the  
>internet concerning profiling of the JVM. Just Google around for  
>'java profiling' and that should help you on your way.
>
>Other than that, I see one possible cause for your issue:
>
>> <snip />
>>     Source src = new StreamSource(new StringReader(theXML));
>>
>
>While there is nothing inherently wrong about the above, depending on  
>the implementation of StreamSource it is possible that this causes  
>underlying calls to StringReader.read() instead of StringReader.read 
>(char[], int, int), which means that your source XML gets read in one  
>character at a time, which in turn would cause a noticeable slowdown...
>
>No idea if it would help here, but maybe one of my first tries would
be:
>
>  Source src = new StreamSource(new BufferedReader(new StringReader 
>(theXML)));
>
>
>HTH!
>
>Cheers
>
>Andreas
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to