W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: Why is querySelector much slower?

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 28 Apr 2015 10:59:11 -0400
Message-ID: <553FA03F.3060901@mit.edu>
To: public-webapps@w3.org
On 4/28/15 2:13 AM, Glen Huang wrote:
> On second thought, if the list returned by getElementsByClass() is lazy
> populated as Boris says, it shouldn't be a problem. The list is only
> updated when you access that list again.

Mutations have to check whether the list is marked dirty already or not.

This is not too bad if you only have a few lists around, but if you have 
several thousand it can start to hurt.

-Boris
Received on Tuesday, 28 April 2015 14:59:40 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC