Hacker News new | past | comments | ask | show | jobs | submit login
JavaScript Will Save Us All (meyerweb.com)
21 points by mojombo on Oct 23, 2008 | hide | past | favorite | 6 comments



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.


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.


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


How do you scan CSS with javascript?



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: