Speed up NodeSets by always keeping them in document order. Only sort when we get nodes in random order (such as for id()) or when merging NodeSets.
This removes the need for the sortByDocumentOrder function. b=85893 r=Pike rs=jag git-svn-id: svn://10.0.0.236/trunk@113703 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -56,16 +56,8 @@ void BasicNodeExpr::setNodeName(const String& name) {
|
||||
* @return the result of the evaluation
|
||||
**/
|
||||
ExprResult* BasicNodeExpr::evaluate(Node* context, ContextState* cs) {
|
||||
NodeSet* nodeSet = new NodeSet();
|
||||
if (!context)
|
||||
return nodeSet;
|
||||
Node* node = context->getFirstChild();
|
||||
while (node) {
|
||||
if (matches(node, context, cs))
|
||||
nodeSet->add(node);
|
||||
node = node->getNextSibling();
|
||||
}
|
||||
return nodeSet;
|
||||
NS_ASSERTION(0, "BasicNodeExpr::evaluate called");
|
||||
return 0;
|
||||
} //-- evaluate
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user