Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1000 Chronic performance during query/stylesheet type checking

v9.2
closed
Michael Kay
5
2012-10-08
2009-10-24
Michael Kay
No

When Saxon, in schema-aware mode, compiles a path expression in a query or stylesheet, it makes a check that elements named in the path expression can actually appear in the schema-defined content model of the context item's type. In the case where the context item's type is a complex type from which many other types have been derived by extension, directly or indirectly, this check may take an inordinately long time. What is actually happening is that Saxon iterates over the types derived by extension from the original type T, then recursively over the types derived by extension from each of these types, and so on; however, the original list of types derived by extension is already the transitive closure, so this involves visiting the same types many times over.

A patch is being raised for this problem in both the 9.1 and 9.2 branches. The main impact is on the class UserComplexType, which is Saxonica-private code; however it also involves changing the signature of the method ComplexType.getElementParticleCardinality(), which is in open-source code.

Discussion

  • Michael Kay
    Michael Kay
    2009-10-29

    Fixed in 9.1.0.8 (but not yet on the 9.2 branch, except in Subversion)

     
  • Michael Kay
    Michael Kay
    2010-01-27

    Fixed in 9.2.0.5