Re: [whatwg/dom] Having getElementsByTagName match on localName is not "web"-compatible for IE and Firefox (#143)

Another reason I would like to match by localName if input has no ':' in input / match by qualifiedName if there is a ':' in input is that I have performance concerns about matching my qualifiedName when there is no ':' in input (common case).

getElementsByTagName() is performance-sensitive. Right now, WebKit matches by localName only which is fast. However, if we adopt the spec has it is, we would have to check both the localName AND the prefix of every element in the subtree. Performance-wise, it would be a net loss.

@foolip 's proposal would only slow down the cases where someone calls getElementsByTagName() with a ':' in the tagName, which is a lot more acceptable.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/143#issuecomment-239327112

Received on Thursday, 11 August 2016 23:50:00 UTC