Re: Selectors API

Anne van Kesteren wrote:
>> I have been told that the reason for not having live collections is 
>> for performance, but I find that hard to understand.  The current live 
>> collections are much faster than their native javascript emulations, I 
>> can't see that getting a collection every time it is required will be 
>> faster than getting it once and using it many times.
> 
> This is in fact the reason they are static. Browser implementors 
> indicated that doing this live would not perform well due to the 
> relative complexity of Selectors.

Just as a point of record, I believe browser implementors were split on 
the issue (e.g. I think in Gecko live performance would be as good, if 
not better in many cases, as non-live performance.  I said so at the 
time as well).

The argument that seemed to carry the day at the time is that live 
nodelists in general are an "anti-pattern" that shouldn't be foisted on 
authors.

-Boris

Received on Monday, 23 March 2009 13:50:24 UTC