[
https://issues.apache.org/jira/browse/XERCESJ-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747939#comment-16747939
]
Mukul Gandhi commented on XERCESJ-1705:
---------------------------------------
Felt like sharing a little finding. Please look at the contents of the
attachment, xs11val_loop.zip. I used a XSLT script to split your original XML
document NEW_PROBLEM.xml, to multiple smaller ones which are in the folder
'docs'. Each smaller XML document has 1000 XML A elements (except one odd small
XML document that has A elements from the last group). We need to run the file
xs11val_loop.bat on the command line, with the command xs11val_loop.bat
NEW_PROBLEM.xsd 1> result.txt 2>&1
to run XSD 1.1 validations in turn on each small XML document. The overall
final validation result is in file result.txt. On my side, the total time taken
was about 20 mins. Validation on each smaller XML document took about 1-1.5
secs.
With this solution, there were no memory issues. The total time taken (20 mins)
is the time to repeat each fast validation (on one small XML file) very large
number of times.
> Validation against asserts (1.1) is slow and takes up a lot of memory for
> larger files.
> ---------------------------------------------------------------------------------------
>
> Key: XERCESJ-1705
> URL: https://issues.apache.org/jira/browse/XERCESJ-1705
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.12.0
> Reporter: Gerben Abbink
> Priority: Major
> Attachments: Java Heap Dump.png, NEW_PROBLEM.xml, NEW_PROBLEM.xsd,
> PROBLEM.xml, PROBLEM.xsd, SaxonEETester.java, SaxonOutput.txt,
> XercesOutput.txt, XercesTester.java, new_prob_mukul.xml, new_prob_mukul.xsd,
> xs11val_loop.zip
>
>
> The validation of xml against asserts in XMLSchema 1.1 is slow and takes up a
> lot of memory for larger xml files. I have created a simple test xml file
> with lots of repetition and a corresponding xml schema to show the problem.
> It takes 20 sec. to validate the xml against the xml schema. When i remove
> the asserts in the xml schema it takes just 1 second to validate. Testing was
> done from the command prompt on a modern Windows machine with 8GByte memory.
> To compare, i have also validated the xml file against the xml schema in
> XMLSpy. With asserts it takes 2 sec., without the asserts 1 sec. (XMLSpy does
> not uses Xerces.)
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]