W3C home > Mailing lists > Public > www-style@w3.org > November 2005

Re: Computational complexity of CSS

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 16 Nov 2005 14:33:09 +0100
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: <www-style@w3.org>
Message-ID: <4tcmn15qce1b0onplpj510fqjvr169mgdv@hive.bjoern.hoehrmann.de>

* Andrew Fedoniouk wrote:
>If let's say in style sheet we have something like this:
>
>  select > option { background-color: color1... }
>  select:focus > option { background-color: color2 ... }
>
>(weird but happens)
>
>then on focus-out event UA must resolve (find and inherit) 
>styles for all 10,000 items-elements (and their children) of the list.
>This is serious task for modern hardware. 
>
>Is anybody looking in this direction or you think 
>this problem is a bit artificial?

Well, what do you really want to know? It is unlikely that we change CSS
in a fundamental way such that this problem does not occur, authors are
not going to put less elements in documents or less rules in stylesheets
and you are probably not concerned about making microprocessors faster,
so are you looking for optimizations that could be applied here? Or are
you concerned about how significant the cascade's performance impact is
in this case (compared to for example drawing the 10000 items)?
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 16 November 2005 13:32:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:41 GMT