You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Mukul Gandhi (JIRA)" <xe...@xml.apache.org> on 2019/01/21 09:19:00 UTC

[jira] [Resolved] (XERCESJ-1705) Validation against asserts (1.1) is slow and takes up a lot of memory for larger files.

     [ https://issues.apache.org/jira/browse/XERCESJ-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Gandhi resolved XERCESJ-1705.
-----------------------------------
    Resolution: Later

It seems, we can't fix the issue raised in this bug report anytime soon without causing much change (and in a riskier way in terms of XSD 1.1 compliance) in Xerces's XSD 1.1 engine. The following alternatives are suggested in the meantime,

1) Use XSD 1.1 CTA (<alternative>) using the XPath subset as defined in XSD 1.1 language.

2) Split the input XML document into smaller XML documents, and run the XSD 1.1 validation serially (or perhaps parallely using java threads) on the smaller XML documents.

> 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
>
>
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org