You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Lihong Pei <Li...@xilinx.com> on 2002/04/10 00:16:17 UTC

Runtime difference between the DOM parsers

Hi,
Is there any information on the runtime difference between the validating DOM
parser (DOMParser::Val_Always) and the nonvalidating DOM parser
(DOMParser::Val_Never)?
Any rough estimation?

Thanks,

Lihong


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


Re: comments on performance

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Ritesh Garodia" <ri...@tidhom1g.grenoble.hp.com> writes:

> hi,
> 
> I was trying to benchmark Xerces parser on HP UX 11i. After running some
> tests, we observed
> 
> * SAX and DOM parsers have some shared global data of size 83k, so average
> amortized size of SAX parser is like 25k and of DOM 26.5k. (running to see
> how many live instances of SAX/DOM parser can have in memory say of 100MB ie
> scalability)
> 
> * SAX Parser  offers better performance than DOM parsers in terms of both
> time and memory. For file with 100-700 elements of 50 bytes/element, SAX
> parsing is nearly 1.5 times faster and has half the memory requirements.

If you could try the same test with the new IDOM, I'd be curious how
much better it is than the old DOM.

jas.

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


comments on performance

Posted by Ritesh Garodia <ri...@tidhom1g.grenoble.hp.com>.
hi,

I was trying to benchmark Xerces parser on HP UX 11i. After running some
tests, we observed

* SAX and DOM parsers have some shared global data of size 83k, so average
amortized size of SAX parser is like 25k and of DOM 26.5k. (running to see
how many live instances of SAX/DOM parser can have in memory say of 100MB ie
scalability)

* SAX Parser  offers better performance than DOM parsers in terms of both
time and memory. For file with 100-700 elements of 50 bytes/element, SAX
parsing is nearly 1.5 times faster and has half the memory requirements.

* Using above results for max XML file of 15k with 300 elements and 50
bytes/element, can we say a SAX parser will need 190k and DOM 310k plus the
shared overhead of 83k memory.

So using this can we extrapolate that we can have roughly 50 SAX parsers and
30 DOM parsers alive in 10MB memory to handle average load of XML files of
size 15k-35k.

Any feedback/comments is highly appreciated.

Thanks
Ritesh



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


RE: Runtime difference between the DOM parsers

Posted by Erik Rydgren <er...@mandarinen.se>.
We did a very rough estimate when we started using Xerces. We have a large
DTD in comparison to the message size (like 30-40 times bigger) and the
first parse takes time (seconds even). But after that first DTD parse we
reuse the validator. Then the performance impact is roughtly 10%.

Regards

Erik Rydgren
Mandarinen systems AB
Sweden


-----Original Message-----
From: Lihong Pei [mailto:Lihong.Pei@xilinx.com]
Sent: den 10 april 2002 00:16
To: xerces-c-dev@xml.apache.org
Subject: Runtime difference between the DOM parsers


Hi,
Is there any information on the runtime difference between the validating
DOM
parser (DOMParser::Val_Always) and the nonvalidating DOM parser
(DOMParser::Val_Never)?
Any rough estimation?

Thanks,

Lihong


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


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