You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by "anthony.dodd" <an...@ntlworld.com> on 2000/11/17 20:06:30 UTC
EntityResolver - too slow for use with schemas
----- Original Message -----
From: anthony.dodd
To: Anthony Dodd
Sent: Thursday, November 16, 2000 11:04 PM
Subject: EntityResolver - too slow for use with schemas
Hi
I'm using an EntityResolver to resolve the name and location of my schema which is contained in the same jar file as the xml source. (attached SRulesEntityResolver.java). Everything works fine the xml source is validated with respect the schema. The problems lies with the length of time it takes to perform the validation and arsing of the xml souce. Without the schema the xml source is parsed in a matter of milliseconds with the schema included we're looking at between 20 and 30 seconds.
Is there any way of speeding up the process, e.g. preloadng schema's using XMLReader, or am I simply going about it the wrong way. Any help would be gladly accepted. I've attached a sample of the xml source (TSTAT01.xml) and the schema (dax.xsd) associated with it.
I'm using xeces-j 1.2.0, J2SE 1.3 on windows NT 4.0 SP6, Intel P3 733Mhz.
Thanks in advance.
Anthony Dodd
Re: EntityResolver - too slow for use with schemas
Posted by Eric Ye <er...@locus.apache.org>.
It turns out the > 20 secs time was spent on the validation, it shocked me at first, but after I opened you schema file, I know it is because the "all" model group you are using and the way Xerces implement the all group: basically an all group was expanded to choice of sequences, in your case, there could be O(6!) sequences, so the content model will be huge and takes substantial time to compile.
so if it not absolutely necessary, don't use all group with more than 3 children.
We really need to redesign the All implementation in the future.
_____
Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org
----- Original Message -----
From: anthony.dodd
To: general@xml.apache.org ; xerces-j-dev@xml.apache.org
Cc: Anthony Dodd
Sent: Friday, November 17, 2000 11:06 AM
Subject: EntityResolver - too slow for use with schemas
----- Original Message -----
From: anthony.dodd
To: Anthony Dodd
Sent: Thursday, November 16, 2000 11:04 PM
Subject: EntityResolver - too slow for use with schemas
Hi
I'm using an EntityResolver to resolve the name and location of my schema which is contained in the same jar file as the xml source. (attached SRulesEntityResolver.java). Everything works fine the xml source is validated with respect the schema. The problems lies with the length of time it takes to perform the validation and arsing of the xml souce. Without the schema the xml source is parsed in a matter of milliseconds with the schema included we're looking at between 20 and 30 seconds.
Is there any way of speeding up the process, e.g. preloadng schema's using XMLReader, or am I simply going about it the wrong way. Any help would be gladly accepted. I've attached a sample of the xml source (TSTAT01.xml) and the schema (dax.xsd) associated with it.
I'm using xeces-j 1.2.0, J2SE 1.3 on windows NT 4.0 SP6, Intel P3 733Mhz.
Thanks in advance.
Anthony Dodd
------------------------------------------------------------------------------
---------------------------------------------------------------------
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
Re: EntityResolver - too slow for use with schemas
Posted by Eric Ye <er...@locus.apache.org>.
It turns out the > 20 secs time was spent on the validation, it shocked me at first, but after I opened you schema file, I know it is because the "all" model group you are using and the way Xerces implement the all group: basically an all group was expanded to choice of sequences, in your case, there could be O(6!) sequences, so the content model will be huge and takes substantial time to compile.
so if it not absolutely necessary, don't use all group with more than 3 children.
We really need to redesign the All implementation in the future.
_____
Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org
----- Original Message -----
From: anthony.dodd
To: general@xml.apache.org ; xerces-j-dev@xml.apache.org
Cc: Anthony Dodd
Sent: Friday, November 17, 2000 11:06 AM
Subject: EntityResolver - too slow for use with schemas
----- Original Message -----
From: anthony.dodd
To: Anthony Dodd
Sent: Thursday, November 16, 2000 11:04 PM
Subject: EntityResolver - too slow for use with schemas
Hi
I'm using an EntityResolver to resolve the name and location of my schema which is contained in the same jar file as the xml source. (attached SRulesEntityResolver.java). Everything works fine the xml source is validated with respect the schema. The problems lies with the length of time it takes to perform the validation and arsing of the xml souce. Without the schema the xml source is parsed in a matter of milliseconds with the schema included we're looking at between 20 and 30 seconds.
Is there any way of speeding up the process, e.g. preloadng schema's using XMLReader, or am I simply going about it the wrong way. Any help would be gladly accepted. I've attached a sample of the xml source (TSTAT01.xml) and the schema (dax.xsd) associated with it.
I'm using xeces-j 1.2.0, J2SE 1.3 on windows NT 4.0 SP6, Intel P3 733Mhz.
Thanks in advance.
Anthony Dodd
------------------------------------------------------------------------------
---------------------------------------------------------------------
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