Package

scales.xml.parser

strategies

Permalink

package strategies

Visibility
  1. Public
  2. All

Type Members

  1. class BaseToken extends OptimisationToken

    Permalink
  2. trait BaseTokenF extends AnyRef

    Permalink
  3. trait ElemOptimisationT[Token <: OptimisationToken] extends MemoryOptimisationStrategy[Token]

    Permalink

    Simple hashmap on Elem -> Elem, makes no optimisations across qnames (use QNameOptimisationT for that)

  4. trait ElemQNameOptimisationT[Token <: ElemToken] extends QNameOptimisationT[Token]

    Permalink
  5. class ElemToken extends QNameToken

    Permalink
  6. trait ElemTokenF extends AnyRef

    Permalink
  7. class ElemValue extends Tree[XmlItem, Elem, xml.XCC]

    Permalink

    An elem with attributes or namespaces and only one text value.

  8. trait FullMemoryOptimisationT[Token <: ElemToken] extends ElemQNameOptimisationT[Token]

    Permalink
  9. trait MemoryOptimisationStrategy[Token <: OptimisationToken] extends AnyRef

    Permalink

    Memory usage in DOMs is often dominated by repeated elements.

    Memory usage in DOMs is often dominated by repeated elements. Xerces and co use string tables to optimise memory usage, with DTM a key example.

    Performing lookups is expensive so the strategies can have selective levels of lookup. Developers may therefore choose appropriate levels that best fit their trade-off between space and time.

    There will, of course, be temporary garbage created for such a scheme but it should pay off for larger messages.

  10. abstract class NameValue extends Tree[XmlItem, Elem, xml.XCC]

    Permalink

    An elem with no attributes, namespaces and only one text value.

  11. trait OptimisationToken extends AnyRef

    Permalink

    Simple marker for per parse optimisation oppurtunties

  12. trait OptimisingStrategiesImplicits extends AnyRef

    Permalink
  13. trait PathOptimisationStrategy[Token <: OptimisationToken] extends MemoryOptimisationStrategy[Token]

    Permalink

    Certain paths may be repeated (based on QNames of parents etc) and known to be by the developer, its also possible that the developer simply is not interested in this path.

    Certain paths may be repeated (based on QNames of parents etc) and known to be by the developer, its also possible that the developer simply is not interested in this path.

    Developers may also customise the creation of paths, for example adding starting children, replacing the XmlChildren implementation or replacing entire subtrees.

  14. trait QNameOptimisationT[Token <: QNameToken] extends MemoryOptimisationStrategy[Token]

    Permalink

    Threadsafe global cache, assumption is most applications would benefit from this

  15. class QNameToken extends OptimisationToken

    Permalink
  16. trait QNameTokenF extends AnyRef

    Permalink
  17. trait TextNodeJoiner[Token <: OptimisationToken] extends TreeOptimisation[Token]

    Permalink

    As this adds extra processing time, but better fits XPath rules (i.e.

    As this adds extra processing time, but better fits XPath rules (i.e. all text children below are joined) its available to be mixed in, but isn't added by default.

    This also removes any extra parsing time from string joining.

  18. trait TreeOptimisation[TOKEN <: OptimisationToken] extends PathOptimisationStrategy[TOKEN]

    Permalink

    Allows replacing a tree for memory optimisations

Value Members

  1. object ElemMemoryOptimisation extends PathOptimisationStrategy[ElemToken] with ElemOptimisationT[ElemToken] with ElemTokenF

    Permalink
  2. object HighMemoryOptimisation extends PathOptimisationStrategy[ElemToken] with ElemOptimisationT[ElemToken] with QNameOptimisationT[ElemToken] with ElemTokenF

    Permalink

    Optimises on QNames and Elems, reducing duplicates at the cost of CHM lookups.

  3. object LazyOptimisedTree

    Permalink

    Collection of optimisations that reduce memory significantly at the cost of parsing performance, and later non-lazy creation of correct objects for accessing the tree.

    Collection of optimisations that reduce memory significantly at the cost of parsing performance, and later non-lazy creation of correct objects for accessing the tree.

    This can have confusing runtime evaluation of XPaths etc. These optimisations are appropriate for trees that are seldom read, repeated reads may generate too much garbage.

  4. object NoOptimisation extends PathOptimisationStrategy[BaseToken] with BaseTokenF

    Permalink

    Performs no optimisation at all

  5. object QNameElemTreeOptimisation extends PathOptimisationStrategy[ElemToken] with ElemQNameOptimisationT[ElemToken] with TreeOptimisation[ElemToken] with ElemTokenF

    Permalink

    Optimised QNames, Elems and Tree, heavily reduced memory consumption with LazyOptimisedTree.

  6. object QNameMemoryOptimisation extends PathOptimisationStrategy[QNameToken] with QNameOptimisationT[QNameToken] with QNameTokenF

    Permalink

    The default as it will equal or better Scala Xml memory consumption at a performance gain.

    The default as it will equal or better Scala Xml memory consumption at a performance gain.

    For the lowest memory consumption possible, for example where memory is more important than raw performance, see QNameElemTreeOptimisation

    See also

    scales.xml.strategies.QNameElemTreeOptimisation

  7. object QNameTreeOptimisation extends TreeOptimisation[QNameToken] with QNameOptimisationT[QNameToken] with QNameTokenF

    Permalink

    Optimises QNames and Trees according to LazyOptimisedTree

Ungrouped