Re: [DOM4] XML lang

On 10/5/11 10:51 AM, Marcos Caceres wrote:
>> One other question: "expensive" is a relative term. How often do you
>> expect to perform this operation?
> Not very in my case. The document is static.

OK.  Just to put this into perspective, on the attached testcase I get 
numbers in the 40-300 range on modern browsers.  That's that many 
treewalks up the DOM in the testcase (which is about 30 levels deep) per 
millisecond.

And you could probably nix the hasAttribute call if you really cared 
about performance...

-Boris

Received on Wednesday, 5 October 2011 15:39:08 UTC