Today i'm playing with slickspeed and prototype and i have found this issue with nonXpath selectors (IE??)
some selector is slow. all slow trouble is related to extend function like:
unique: results.push(Element.extend(n));
use of Element.nextElementSiblings, Element.descendantOf, Element.hasAttribute, Element.readAttribute..
I agree not all is "elegant" fixable but someone affect some important selector like: * and div[class]
nth-child selector is all bugged (i'm not sure for fix)
h.mark(nodes);
for (var i = 0, node; node = nodes[i]; i++) {
if (!node.parentNode._counted) {
h.index(node.parentNode, reverse, ofType);
indexed.push(node.parentNode);
}
}
first mark all nodes with _counted "flag" and later check if is false?? (only first parentNode is false)...
commentend mark funcition fix returned count element (but slow down)
div ~ div selector is sloow :( (i can't understand why... i think too many not unique result?)