> Last patch wasn't soo spectacular, but the first second to last was > pretty good again. Got a build on my laptop from 14.11 to 11.41 :-) > I was working on the laptop, so results aren't too reliable though. > Thank you.
>> That is my last easy patch, I will try to go inside >> Canonicalizer20010315Excl because is more or less the 80% of the time >> of my execution. If anyone has some idea of what to look for, please >> tell me. > > I have taken quite a few big looks at C14N trying to speed it up, but > it's amazingly complex. I think the only way to get some real speed > improvements is by redesigning the algorithm, but I don't even know if > that's feasible :) > > I have tried to code with proper final declarations and keeping object > generation out of loops, but that didn't knock anything decent off, so > I reverted the code as it was even more unreadable afterwards. > I have refactor the c14XPathNodeSet so it isnīt recursive, I havenīt see neither speed increase nor decrease(and thatīs weird becouse I use java.util.Stack instead of the java own stack). But now i can let the jrat(jrat.sf.net) to profile more acurately.When I see some minor speed up(1sec over 14sec) is in changing the: void outputAttrToWriter(String name, String value) throws IOException { this._writer.write(" "); this._writer.write(name); this._writer.write("=\""); int length = value.length(); char[] c=value.toCharArray(); for (int i = 0; i < length; i++) { //Use the array index instedof getCharAt(i) switch (c[i]) { But i wait till to submit the patch till i have a better picture of what to change. Other things that I will try is changing the ByteArrayOutputStream to a StringBuffer, just for the shake of change.But i think all the changes will be very JVM dependent or something like this. > The other thing is that I don't want to introduce too major changes in > this version. Ideally the big changes will happen in the next version, > which shouldn't take too long anymore.. (Yes I am aware I have been > saying that for months.. I always underestimate the desire for > bureaucracy in big companies ;-) ) > I think so, Something as big as a rework c14n must be postpone to the next release. Raul