> From: Sylvain Wallez [mailto:[EMAIL PROTECTED]] > > 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?
Yepp. > > > Do you know when is this class used, and why it is instancied so often ? Used to report an exception. Search shows 8 files. The most important ones are: org\apache\xalan\processor\TransformerFactoryImpl.java org\apache\xalan\transformer\TransformerIdentityImpl.java org\apache\xalan\transformer\TransformerImpl.java org\apache\xpath\XPath.java It is instantiated as often as these classes are instantiated. In Cocoon, TransformerIdentityImpl is used in every SAX pipeline at least once. > >>PS If somebody could ask Xalan guys to get rid of new PrintWriter() - > >>this would be great :) > >> > >Did post a message on Xalan Dev? Nope... Yet. > >>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 I saw one issue with XSPs & classloaders: Every compilation of XSP creates a ClassLoader (for obvious reasons), which is not garbage collected (under OptimizeIt). > >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. Ok, you already have a volunteer for this. Good luck, John! :) > Sylvain > > -- > Sylvain Wallez > Anyware Technologies - http://www.anyware-tech.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]