xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] XOMTestCase.assertEquals() too slow
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] XOMTestCase.assertEquals() too slow
- Date: Fri, 26 Jan 2007 13:47:35 -0500
Wolfgang Hoschek wrote:
Turns out the comparison is implemented with an O(N^2) algorithm. It stems from the (unnecessary) stateless nature of getNonTextNode (expected, i) as used from XOMTestCase.compareChildren():
I've checked in a tentative fix for the problem. Please let me know if this works for you.
The compareChildren method has not been heavily optimized. Doubtless there are other ways to improve it if it's still a hot spot.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/
-
[XOM-interest] XOMTestCase.assertEquals() too slow,
Wolfgang Hoschek, 01/25/2007
-
Re: [XOM-interest] XOMTestCase.assertEquals() too slow,
Wolfgang Hoschek, 01/26/2007
- Re: [XOM-interest] XOMTestCase.assertEquals() too slow, Wolfgang Hoschek, 01/26/2007
- Re: [XOM-interest] XOMTestCase.assertEquals() too slow, Elliotte Harold, 01/26/2007
-
Re: [XOM-interest] XOMTestCase.assertEquals() too slow,
Wolfgang Hoschek, 01/26/2007
Archive powered by MHonArc 2.6.24.