Hi, I have encountered an performance issue while validating xml(5kb) against xsd's(12kb). It took nearly 30 seconds for the validation. As baseX is using java API's, we did the same validation using simple java. we noticed that the caching of schema object reduces the time significantly(from 30 seconds to 8 milli seconds.). Is there a place where we could configure to enable/diable caching of schema or it needs the code to be re-factored or is there a workaround?
Thanks, Seenivasan
Dear Seenivasan,
Would you be so kind to provide your executed query and even better the xml file to validate and the schema (you can also send it to me privately)? As I have a query were I validate a xml file of about 150kb against a much larger xsd (~300kb + including other xsds of about 500kb) which takes only some ms, I can not reproduce your issue with the provided information. It might be something specific to your xsd.
There is currently no caching of the xsd internally. What you could do is to store the content of the schema in a variable and then use this node() as input of the validate:xsd() function. Please see [1] for the documentation of this function, which also states this possibility.
Cheers, Dirk
[1] http://docs.basex.org/wiki/Validation_Module
On Fri, Jul 27, 2012 at 12:37 PM, Seenivasan Gunabalan < seenivasan.gunabalan@dedalus.eu> wrote:
Hi, I have encountered an performance issue while validating xml(5kb) against xsd's(12kb). It took nearly 30 seconds for the validation. As baseX is using java API's, we did the same validation using simple java. we noticed that the caching of schema object reduces the time significantly(from 30 seconds to 8 milli seconds.). Is there a place where we could configure to enable/diable caching of schema or it needs the code to be re-factored or is there a workaround?
Thanks, Seenivasan ______________________________**_________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-**konstanz.de BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.**de/mailman/listinfo/basex-talkhttps://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de