[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    Re: DeferredDocumentImpl?
From:       Alistair Young <alistair () smo ! uhi ! ac ! uk>
Date:       2004-12-14 14:35:01
Message-ID: 565138EE-4DDD-11D9-9D13-000A95A7C766 () smo ! uhi ! ac ! uk
[Download RAW message or body]

thanks Joseph. That makes sense.
Alistair

On 14 Dec 2004, at 14:04, Joseph Kesselman wrote:

>
>
>
>
> On Tuesday, 12/14/2004 at 01:09 GMT, "Alistair Young"
>> It seems to get
>> populated as you do things on it, such as getNodeName/getNodeValue 
>> etc.
>> For instance, after parsing, DeferredDocumentImpl.firstChild is 
>> sometimes
>> null, or points to a structure full of nulls. After calling
>> getNodeName/getNodeValue on the root node, firstChild is populated.
>> What's the difference between DeferredDocumentImpl and DocumentImpl?
>
> That's precisely the difference.
>
> DocumentImpl is part of a simple standalone implementation of the DOM 
> APIs.
>
> DeferredDocumentImpl is part of the Xerces "Deferred DOM", used
> specifically for DOMs created by the parser. For this implementation, 
> the
> parser stores the document's contents in a more compact back-end form 
> and
> expands them into DOM objects as you walk the DOM tree; this can 
> reduce the
> amount of object churn if you don't need to look at the whole tree, 
> and may
> (I'm not sure about this) also reduce latency before the first node is
> available (though if it does, that may be at the expense of reduced
> throughput before the last node is avaialable; that's the usual 
> pipelining
> tradeoff.) I haven't looked at the exact details in a long time, so the
> best I can suggest is that you read the code if you need more 
> specifics.
>
> For a similar concept at a different trade-off point, see the DTM data
> model that Xalan uses as its internal representation. (Actually, I just
> thought of another way we might be able to optimize that, but I need to
> work with it a while before I'll be convinced it's really a net win.)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic