Project

Profile

Help

Bug #4554

closed

Extremely slow grammar loading depending on ordering.

Added by Chris Simmons over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2020-05-14
Due date:
% Done:

100%

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

Description

My company, CoreFiling, are currently using Saxon EE 9.7.0.7.

We've discovered a performance problem which seems to stem from the order in which grammars are loaded. The difference is stark, on my machine its ~5s vs ~90s. I've attached some code and lots of schemas demonstrating the problem.

TestSchemaLoading loads the same grammars in three different ways. If you diff filing vs filing-copy you'll see we've added a single import. Loading 'filing-copy' is fast whereas loading 'filing' then loading a second namespace is slow. If you reverse the order of the imports then its fast again.

We may have worked around this by producing a synthetic schema that imports all the schema grammars that we want to load. I'm not sure however whether it really works around the problem since I don't know what's really going wrong under the hood.

To run it you'll need to add a ActivateSaxon.java and put saxon ee jar and junit 4 on the classpath.


Files

saxon-schema-bug.zip (13.7 MB) saxon-schema-bug.zip Chris Simmons, 2020-05-14 09:15

Please register to edit this issue

Also available in: Atom PDF