xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Clark <an...@apache.org>
Subject Re: JDOM in Apache (was Re: xml.apache.org charter proposal)
Date Thu, 05 Apr 2001 22:24:26 GMT
Scott_Boag@lotus.com wrote:
> True enough.  However, I believe that the things that Xalan needs are a
> very good indicator of what is needed in a general API.

You are probably right. And as I said, it was just my first
opinion after looking at the API.

> "bloating" is the wrong word.  The type of operations the DTM is performing
> can be best optimized close to the parser.  For instance, traversal of the
> "following" or "descendant" axes can be pretty complex with getFirstChild,
> getNextSibling, and getParent.  But it can be done very quickly if the
> storage method is an array.

Yep, I agree. The parser can augment the tree structure it
builds so that answering these types of questions is fast.
Of course, these optimizations assume read-only access. Are 
there any thoughts towards being able to edit the tree?

> I'm not sure what you mean.  The bottom line is that we need some character
> model, and arrays of characters are the best bet.  I don't see how this can
> be avoided.  Do you have ideas on this front?

I should have been more specific about the comments that I
was making in regards to the character model. What I really
want to know is how much performance do you expect to gain
by allowing the string values to be "chunked"? 

Perhaps I just need some clarification about the chunking. 
For example, does the code constructing the tree need to 
orphan its character buffers to the DTM in order for the 
chunking to work? Or is this chunking just for the internal 
DTM use to store text?

I want to make sure that the things we add for performance 
reasons will actually improve performance and not just move 
work from the data model into the parser.

Also, what about the setParseBlockSize method? What's that 
doing there?

> Possibly an oversight.  In general the exception model is supposed to be
> runtime exceptions, so I think I just removed the checked exception decl.
> We can work on this.

I don't like using runtime exceptions as the exception
model. I would prefer to use an explicit exception class.
In XNI, we've agreed to use the SAX exceptions throughout
the framework.

Andy Clark * IBM, TRL - Japan * andyc@apache.org

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message