xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shengyou Zeng <sz...@cisco.com>
Subject xerces-j 2 sample ASBuilder - AS performance
Date Fri, 07 Jun 2002 23:15:19 GMT

The sample program dom.ASBuilder shipped with Xerces-j 2.0.1
"illustrates how to preparse xml schema documents and how to
  validate instance documents against preparsed schema grammars."
(quotes from DOM Sample page for xerces-j 2).  I was hoping that,
because of schema preparsing, the performance of ASBuilder
should improve compared to straight DOM 2.  However, that is not
the case.  As a matter of fact, the DOM 3 implementation with
schema preparsing fares worse than DOM 2 xerces-j 
(org.apache.xerces.parsers.DOMParser).
For example, in my case, using the same schema and the same xml
instance (parsing and validating 100x), ASBuilder costs 10000 ms while
DOMParser costs 8000 ms.  (In case you are wondering, I did set
schema validation and namespace features to true for the DOMParser).

My understanding is that Abstract Schema preparses schema and validation
of repeat xml documents uses the preparsed schema.  This is what sample
ASBuilder is supposed to demonstrate.  Thus using Abstract Schema should
save schema (loading and) parsing time.  But why don't see the performance
gain one would expect?   What am I missing?

Thanks.

-Shengyou


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


Mime
View raw message