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

Re: Computational complexity of CSS

From: Malcolm Rowe <malcolm-www-style@farside.org.uk>
Date: Wed, 16 Nov 2005 23:58:06 +0000
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Bjoern Hoehrmann <derhoermi@gmx.net>, www-style@w3.org
Message-ID: <20051116235806.GA3676@lorenz.farside.org.uk>

On Wed, Nov 16, 2005 at 12:53:19PM -0800, Andrew Fedoniouk wrote:
> I beleive that at least some recommendations should be
> published on W3C site like:
> 
> ".a1 > .a2" is better than ".a1 .a2"
> "p[a1]" is better than just "[a1]",
> etc.
> 

I think I'm right in saying that at least the second of those will
actually be _slower_ in Gecko: it resolves style from the 'inside out',
so upon adding an attribute 'a1', it will actually have to do additional
work to check that the attribute belongs to an element called 'p'

Even if that's not entirely accurate, it's still true to say that those
kind of suggestions would have to be made in the context of a specific
implementation, because, as several people have mentioned, the assertions
you've made above don't actually follow from the specification at all.  So
I could see Mozilla or Opera publishing 'Optimising CSS for {Gecko,Opera}'
documents, perhaps, but it's not really something that falls to W3C to do.

Regards,
Malcolm
Received on Wednesday, 16 November 2005 23:58:30 GMT

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