Torsten Curdt wrote:

>On Sun, 27 Jan 2002, Vadim Gritsenko wrote:
>
>>Hi,
>>
>>While playing with OptimizeIt, I found quite interesting piece of code
>>in Xalan code, class org.apache.xml.utils.DefaultErrorHandler:
>>
>>  public DefaultErrorHandler()
>>  {
>>    m_pw = new PrintWriter(System.err, true);
>>  }
>>
>So it's the creation of that PrintWriter that takes so long?
>
Do you know when is this class used, and why it is instancied so often ?

>>Which, according to OptimizeIt, takes 42.72% of time on the simple
>>pipeline with XSP generator and XML serializer (modified /cocoon/sub/xsp
>>sample, without transformation). This was hard to believe, so I got
>>Xalan CVS and quickly hacked this class (diff attached). The results are
>>astonishing: also I did not get much improvement in throughput (too much
>>time was taken by the sockets; may be more testing threads will help),
>>but processing time improved on 386%, from 498 ms to 129 ms.
>>
>>I though somebody might be interested in this result, so here is the
>>letter :)
>>
>Definitly ;)
>
>>PS If somebody could ask Xalan guys to get rid of new PrintWriter() -
>>this would be great :)
>>
>Did post a message on Xalan Dev?
>
>>PPS XSPs *are* fast. XSL is slow :-|
>>
>...but people say XSPs are not skaling very good. AFAIR (vaguely) Berin
>tracked this down (also with optimizeIt) and it was a classloader issue.
>Berin, is this right? Please correct me if I am wrong... I guess this
>raised the monitoring thread...
>
... or is this bad scalability a past myth ? I refactored 
ServerPagesGenerator at the beginning of december to make the 
document-completion stuff faster and optional (disabled by default). 
This was using a LinkedList to keep track of the open XML elements.

For more info, see 
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=100739488123738&w=2

The next thing that's needed for XSP to be as fast as a regular 
generator is a way to remove unneeded white space used for indenting in 
the XSP source : about half of produced SAX events are blank strings.

Sylvain

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com




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

Reply via email to