Hi, I'm Cocoon developer, and while doing some performance tests to find out hotspots and possible optimizations, I found quite interesting Xalan-related thing.
The class org.apache.xml.utils.DefaultErrorHandler has following piece of code in it: public DefaultErrorHandler() { m_pw = new PrintWriter(System.err, true); } And this, according to OptimizeIt, takes 42.72% of time on my Cocoon performance tests. This was hard to believe, so I got Xalan CVS and quickly hacked this class to remove this "new PrintWriter()". The results are astonishing: now test runs at 386% speed; this is decrease in processing time from 498 ms to 129 ms! I believe that somebody from Xalan committers would find this interesting and would like to review this class and come up with solution which will improve overall Xalan performance. Attached are the changes that I quickly made for my test. Regards, Vadim
DefaultErrorHandler.diff
Description: Binary data