package strategies
- Alphabetic
- Public
- All
Type Members
- class BaseToken extends OptimisationToken
- trait BaseTokenF extends AnyRef
-
trait
ElemOptimisationT[Token <: OptimisationToken] extends MemoryOptimisationStrategy[Token]
Simple hashmap on Elem -> Elem, makes no optimisations across qnames (use QNameOptimisationT for that)
- trait ElemQNameOptimisationT[Token <: ElemToken] extends QNameOptimisationT[Token]
- class ElemToken extends QNameToken
- trait ElemTokenF extends AnyRef
-
class
ElemValue extends Tree[XmlItem, Elem, xml.XCC]
An elem with attributes or namespaces and only one text value.
- trait FullMemoryOptimisationT[Token <: ElemToken] extends ElemQNameOptimisationT[Token]
-
trait
MemoryOptimisationStrategy[Token <: OptimisationToken] extends AnyRef
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.
-
abstract
class
NameValue extends Tree[XmlItem, Elem, xml.XCC]
An elem with no attributes, namespaces and only one text value.
-
trait
OptimisationToken extends AnyRef
Simple marker for per parse optimisation oppurtunties
- trait OptimisingStrategiesImplicits extends AnyRef
-
trait
PathOptimisationStrategy[Token <: OptimisationToken] extends MemoryOptimisationStrategy[Token]
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.
-
trait
QNameOptimisationT[Token <: QNameToken] extends MemoryOptimisationStrategy[Token]
Threadsafe global cache, assumption is most applications would benefit from this
- class QNameToken extends OptimisationToken
- trait QNameTokenF extends AnyRef
-
trait
TextNodeJoiner[Token <: OptimisationToken] extends TreeOptimisation[Token]
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.
-
trait
TreeOptimisation[TOKEN <: OptimisationToken] extends PathOptimisationStrategy[TOKEN]
Allows replacing a tree for memory optimisations
Value Members
- object ElemMemoryOptimisation extends PathOptimisationStrategy[ElemToken] with ElemOptimisationT[ElemToken] with ElemTokenF
-
object
HighMemoryOptimisation extends PathOptimisationStrategy[ElemToken] with ElemOptimisationT[ElemToken] with QNameOptimisationT[ElemToken] with ElemTokenF
Optimises on QNames and Elems, reducing duplicates at the cost of CHM lookups.
-
object
LazyOptimisedTree
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.
-
object
NoOptimisation extends PathOptimisationStrategy[BaseToken] with BaseTokenF
Performs no optimisation at all
-
object
QNameElemTreeOptimisation extends PathOptimisationStrategy[ElemToken] with ElemQNameOptimisationT[ElemToken] with TreeOptimisation[ElemToken] with ElemTokenF
Optimised QNames, Elems and Tree, heavily reduced memory consumption with LazyOptimisedTree.
-
object
QNameMemoryOptimisation extends PathOptimisationStrategy[QNameToken] with QNameOptimisationT[QNameToken] with QNameTokenF
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
-
object
QNameTreeOptimisation extends TreeOptimisation[QNameToken] with QNameOptimisationT[QNameToken] with QNameTokenF
Optimises QNames and Trees according to LazyOptimisedTree