xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] StackOverflowError compiling XOM
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: cowwoc <cowwoc AT bbs.darktech.org>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] StackOverflowError compiling XOM
- Date: Tue, 13 Jan 2009 08:02:49 -0800
cowwoc wrote:
The next thing I would recommend optimizing is "UnicodeUtil.decompose(int character)". It is a whopping 6934 lines of code and is likely causing the most pain for compilers and obfuscators. You could either break this method down into multiple methods (since most of its execution is linear anyway) or replace the if-else statements with a switch block to improve performance but then reducing the method size is not as obvious.
I've checked in an experimental fix for decompose that reduces the number of byte codes and LOCs in the method at the expense of an equivalent expansion of the string table. I'm not sure if this will work or not. I could still move to a switch statement, or table lookup.
There is a "FIXME must recurse this" beside it, so maybe you already have ideas for breaking it down?
That's unrelated. The Unicode NFC algorithm requires something like decomposing characters repeatedly until they don't decompose any more (I forget exactly. It's been a while) and I need to look into that.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Harold, 01/12/2009
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 01/12/2009
- <Possible follow-up(s)>
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 01/13/2009
Archive powered by MHonArc 2.6.24.