W3C home > Mailing lists > Public > www-style@w3.org > August 2011

Re: CSS regexes

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Fri, 5 Aug 2011 16:53:49 +0200
Message-Id: <BA96A49C-D660-42FF-8897-44C6D793037C@crissov.de>
To: CSS WG <www-style@w3.org>
Tab Atkins Jr.:

> In the internal data structures that every browser uses, the text is stored across at least three bits - "This is " and " cool!" are in separate text nodes, and "so" is in another textnode inside the <em> node.  Trying to match a regex across those probably involves walking through and constructing an intermediate string that concatenates them all.  This is potentially slow and expensive;

I always imagined the DOM leaves, i.e. text nodes, to form a linked list – like in a B+ tree.
Received on Friday, 5 August 2011 14:54:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:03 UTC