Nope the penalty for using document fragments is very low. The fragment
has to be allocated / deallocated of course and there will be an extra
node insert performed. So the price is low. However if you construct
many fragment the overhead will be noticeable. And if you construct a
fragment for each node in the tree the overhead will be significant. In
that case I would consider sending the parent node to be populated
around in the system instead.

/ Erik

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: den 29 september 2003 08:54
> To: [EMAIL PROTECTED]
> Subject: Efficiency of document fragments?
> 
> We used the XMLSpy Code Generator in order to fast-prototype and
develop
> some XML software in C++. Xerces was selected as the underlying DOM
under
> the higher level XMLSpy-generated object model.  All worked great but
we
> do have some memory leak issues (we have to process hundreds of XML
files
> at a time and they bogged down the system because of the memory leak
--
> XMLSpy issued a bug report related to it).  Anyway ... that was just
> background ...
> 
> Typically in our calling sequence we are "constructing and populating"
XML
> node subtrees and then attaching them to parent node(s) afterwards
i.e.
> making use of document fragments and then appending those to parent
nodes.
> Is this less efficient than doing the parent/child attachment before
> further populating the children with more nodes?  Is there a preferred
> way?
> 
> thanks,
> durwood
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to