Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1705

Validation against asserts (1.1) is slow and takes up a lot of memory for larger files.



    • Bug
    • Status: Resolved
    • Major
    • Resolution: Later
    • 2.12.0
    • None
    • None


      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.)



        1. Java Heap Dump.png
          92 kB
          Gerben Abbink
        2. new_prob_mukul.xml
          33.07 MB
          Mukul Gandhi
        3. new_prob_mukul.xsd
          1 kB
          Mukul Gandhi
        4. NEW_PROBLEM.xml
          29.68 MB
          Gerben Abbink
        5. NEW_PROBLEM.xsd
          0.8 kB
          Gerben Abbink
        6. PROBLEM.xml
          2.26 MB
          Gerben Abbink
        7. PROBLEM.xsd
          0.7 kB
          Gerben Abbink
        8. SaxonEETester.java
          0.9 kB
          Gerben Abbink
        9. SaxonOutput.txt
          1 kB
          Gerben Abbink
        10. XercesOutput.txt
          0.5 kB
          Gerben Abbink
        11. XercesTester.java
          1 kB
          Gerben Abbink
        12. xs11val_loop.zip
          331 kB
          Mukul Gandhi



            Unassigned Unassigned
            Gerben Abbink Gerben Abbink
            0 Vote for this issue
            1 Start watching this issue