extension PureXML.Schema { /// Memoizes the resolved simple type of a complex type's `simpleContent`, keyed by the /// complex type's name, during one compile. A `simpleContent` derivation chain (`T0` /// extends `T1` extends `T2`, and so on) is flat in the document, so without this each /// of the N types re-walks its whole base chain while being compiled, an O(n^3) compile /// (a 400-link chain took ~23 s); sharing the resolution makes it linear. A reference /// type so it survives the value-type ``XSDContext`` copies (`scoped`/`visiting`); one /// instance per compile. An acyclic resolution is intrinsic to the name (a derivation /// cycle is rejected elsewhere), so the name is a sufficient key. final class SimpleContentMemo { var store: [String: PureXML.Schema.SimpleType] = [:] } }