

JavaScript Will Save Us All - mojombo
http://meyerweb.com/eric/thoughts/2008/10/22/javascript-will-save-us-all/

======
gruseom
This leapt out at me:

 _[Javascript] engines are being overhauled and souped up and tuned and re-
tuned to the point that performance is improving by orders of magnitude.
Scanning the DOM tree and doing things to it, which used to be slow and
difficult, is becoming lightning-fast and easy._

This is not only a non sequitur, it's false. Making JS faster doesn't imply
making DOM manipulation faster: they are two different things. Moreover, DOM
manipulation is not becoming "lightning-fast and easy". In some cases it's
getting slower and harder. (This is sort of my bête noire right now.)

It may be that Meyer doesn't write applications. That's fine; I don't pay much
attention to CSS.

~~~
michaelneale
yeah I always felt that a lot of the bottlenecks today were DOM related - sure
having fast JS means you can do more crunching in JS itself, but at the end of
the day the user still experiences the sluggish dom when you are trying to
build up a screen.

------
notquitehere188
I recently wrote a script to test this.

Using the benchmark at <http://www.howtocreate.co.uk/csstest.html> I applied
all the styles using jquery. It ended up being roughly 10x slower. But the
real issue seems to be the browser.

The jquery code finishes up really fast, but the browser sits there for a
noticeable delay, presumably rendering. In firefox this means that you look at
an unstyled page for a while.

But this only addresses the issue of CSS3 Selectors. I am curious about the
possibility of implementing more of CSS3 in jquery. Seems like it would be
incredibly slow, will have to try

------
twism
How do you scan CSS with javascript?

~~~
aston
<http://www.javascriptkit.com/dhtmltutors/externalcss3.shtml>

~~~
twism
I haven't used the css rules object in years... I honestly forgot about it's
existence.

