Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Cyclic checking

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Dick Hollenbeck <dick AT machj.com>, XOM Maillist <xom-interest AT lists.ibiblio.org>
  • Cc:
  • Subject: Re: [XOM-interest] Cyclic checking
  • Date: Fri, 19 Sep 2003 08:40:04 -0400

At 3:53 PM -0500 9/18/03, Dick Hollenbeck wrote:
Please be careful of the cycle dependency checking code's overhead and how it might impact the speed of document building. This checking is probably best done by using Assert()s so that it can be compiled in and out easily, as needed.
Speed is more important for most of us. We'll find our bugs eventually.

Rusty, have you done a before and after benchmark? This feature is not worth a speed hit to me.

I'll eventually look into ways of speeding it up, but I do not believe speed is more important than correctness. A program that does the wrong thing 1000 times faster is useless. The only reason this check wasn't in since the beginning is that I mistakenly thought the multiple parent checks would catch it. I should have a written a unit test to verify that assumption. :-(

One thing all my profiling shows is that the only places speed matters are parsing and serialization. These completely swamp in-memory manipulations. This change has no effect on serialization. I should be able to eliminate it from having any effect on parsing as well. Parsing currently short circuits a lot of checks the parser has already done. I should be able to short this one too, though it may not currently be short circuited in 1.0d21.

--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page