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: John Cowan <jcowan AT reutershealth.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Cyclic checking
  • Date: Fri, 19 Sep 2003 13:46:37 -0400

At 1:27 PM -0400 9/19/03, John Cowan wrote:


A program that does
the wrong thing 1000 times faster is useless.

Which would you rather have, a version of Saxon with one bug less, or one
that ran 1000 times faster?

Well, let's see. How much time would I save if Saxon, already quite fast, ran 1000 times faster? It might save me a minute or two on my most demanding transforms, a few times a year. That would be useful. Of course that is time I can multitask on other things like reading e-mail, so it's not time that's purely wasted.

On the other hand, if Saxon had had one less bug (and the right one less bug) a month or two ago, it would have saved me hours of time I spent tracking down a Saxon problem, and would have allowed me to continue using Saxon in XOM rather than Xalan. I think I'd rather have one less bug. :-)

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.

If you make the test I mentioned above (which someone else on the list came
up with, not me), then it is implicitly in effect during parsing, since parsers
always add new nodes to old.

I thought of that, and it may be true. However, I need to look at it more closely. Although that's how the parser behaves, I think XOM currently builds up subtrees completely before attaching them to the parent node. That is, an element node is only attached to its parent on the endElement(), not startElement(). This is useful for filtering and streaming. However, it does mean that non-empty elements have children when added to their parent.

However, this is probably temporary. I should be able to special case the parser's adding of nodes to short circuit this and a couple of other minor tests.


--

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