Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.9, 5.12.0, 5.12.1
-
None
-
Intel(R) Xeon(R) CPU E3-1535M v6 @ 3.10 GHz
32 GB RAM
Windows 10 Enterprise 64-bit
Qt 5.12.0 MSVC2017 64-bit
Description
I've ran into a case of a XSD which causes the QXmlSchemaValidator to become very (!!) slow. This seems to be independent of the size of the schema being validated. It does seem to be related to the use of the <xs:all> element in the XSD.
I could work around this, however, I don't think this is desired behavior.
I've created a sample project which shows the validation time rapidly increasing depending of the amount of children the <xs:all> element in the schema definition counts. The <xs:all> element containing only 6 different possible children already causes the QXmlSchemaValidator to be too slow to work with.
In the sample project I validate only one distinct schema against slightly different schema definitions.
The output of the sample project I created and attached:
======================================
Schema ":/schema-def.xsd" valid: true
XML valid: true
Validation took: 7 ms
======================================
Schema ":/schema-def-slower.xsd" valid: true
XML valid: true
Validation took: 1197 ms
======================================
Schema ":/schema-def-slow.xsd" valid: true
XML valid: true
Validation took: 136634 ms
Attachments
Issue Links
- duplicates
-
QTBUG-12534 XmlSchema Validation stuck in allCombinations loop
- Closed