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, 15 Jul 2008 08:22:08 -0700
cowwoc wrote:
I've generated a replacement for UnicodeUtil.getCombiningClass() that consists of 223 lines of code and runs approximately 20x faster than the original code (which consists of 1143 lines of code). Please see the attached file.
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.
Thanks. I'll look at these when I get a minute. I may have misspoken earlier, I was thinking of the Verifier XML name and text methods more than the UnicodeUtil methods you mention. Those particular methods are only used by the serializer, and only when certain uncommon options are chosen so they haven't been as heavily optimized as the methods that are invoked for every single element, attribute, and text construct. Possibly, here, I could take some performance hit in exchange for not pushing the compiler's buttons. This is all non-public code used internally by XOM so we can be pretty aggressive about refactoring if it helps.
The recurse FIXME you mention is about a possible bug, not performance.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
-
[XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/09/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 07/09/2008
- <Possible follow-up(s)>
-
[XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Michael Kay, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Rusty Harold, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Harold, 07/14/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/14/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, cowwoc, 07/14/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, cowwoc, 07/15/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 07/15/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 07/15/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/14/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Harold, 07/14/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Rusty Harold, 07/10/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Michael Kay, 07/11/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Michael Kay, 07/10/2008
Archive powered by MHonArc 2.6.24.