Project

Profile

Help

Bug #4982

closed

Loading xml schemas which are stored inside a zip archive is very slow compared to Xerces

Added by Tomas Vanhala almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-05-04
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:

Description

We have an in-house application which, prior to processing an xml document, validates it against the xml schema. The xml schemas are stored in zip archives, which we obtain "out of band" from associated parties. We make the schemas available to our application by copying the zip archives to an appropriate location (file path).

We have used Xerces for validation, but now we wish to move to Saxon-EE. We have discovered that Saxon is very slow when loading the xml schema files. We are using version 10.3.

I have attached a small demo application that measures the time it takes for the Xerces and Saxon implementations to load a set of xml schema files. (You will need to adjust the paths to the zip file and the license file.)

Apart from Saxon being very slow, we also observe that Saxon calls LSResourceResolver more often than Xerces.

Can the performance of Saxon be improved?


Files

SaxonBugDemo.java (8.69 KB) SaxonBugDemo.java small demo app Tomas Vanhala, 2021-05-04 10:01
SchemaValidatorImplTest_zipped_schemas.zip (31.9 KB) SchemaValidatorImplTest_zipped_schemas.zip schemas used by the demo app Tomas Vanhala, 2021-05-04 10:02
SaxonBugDemo.zip (29.8 MB) SaxonBugDemo.zip The ZIP archive containing refined demo code with all dependencies included. Tomas Vanhala, 2021-06-07 16:45
SaxonStack.pdf (493 KB) SaxonStack.pdf Tomas Vanhala, 2021-07-29 16:16
SaxonBugDemov2.zip (29.9 MB) SaxonBugDemov2.zip Demo code with improved packaging Tomas Vanhala, 2021-08-02 16:36
demo.log (44.9 KB) demo.log Log created by running the demo code Tomas Vanhala, 2021-08-02 16:45

Please register to edit this issue

Also available in: Atom PDF