Live data from Hacker News

How Bad is DOM Interaction Really?

andyshora.com

31–38 of 38 posts

Re: How Bad is DOM Interaction Really?

#31

Earlier quoted context omitted.

The DOM is a failed institution trying to grab on the the ledge before it falls into the abyss. W3C should be disbanded and HTML5 abandoned. JavaScript and it's ilk should be boycotted by users as well. This kind of complexity should exist on the server, not in the browser. I understand that people want to run complex apps in the browser. It's a bad idea in general but where it's needed, it should be PLATFORM DEPENDE…

To the Hellbanned user who replied: Well look what "good enough" has brought us now on the web. Constant security issues and a outbreak of for profit blackhats.

I don't disagree with your comment except to say that sandboxed, client-side programming - done correctly - isn't a bad idea. But "good enough", whether you or I like it or not, is what we are going to get. I'm not endorsing this state of affairs, but I don't control reality.

Re: How Bad is DOM Interaction Really?

#32
post #16
post #2

After 10+ years as a performance leaning C++ desktop app developer I'm looking for any and all tips to make JavaScript (jQuery too) work in perceivably faster ways. I'm use to threading database calls, using message queues, and views updating themselves from caches. It’s a new world for me and feels somewhat like a step backwards. Here I come html5!

For performance any platform is a step backwards, the leveling for easier/broader access is never free.

Rubbish. "Leveling" done in userspace (e.g. libraries) doesn't create a fundamental step back. The browser is just a horribly designed, and why, in spite of years of procrastination and denial - and HN is no exception - it has ultimately ended up as a virtual machine combined with basic primitives (albeit years too late and not done very well at all). My hellbanning on this site is a great example of why this site sucks. How many of the losers who hang out on this site all day collecting karma (as opposed to.. programming) called these problems? Practically nobody, and yet HN is deprived of my wisdom because I am too blunt and don't have an established account.

Re: How Bad is DOM Interaction Really?

#33

Earlier quoted context omitted.

The DOM is a failed institution trying to grab on the the ledge before it falls into the abyss. W3C should be disbanded and HTML5 abandoned. JavaScript and it's ilk should be boycotted by users as well. This kind of complexity should exist on the server, not in the browser. I understand that people want to run complex apps in the browser. It's a bad idea in general but where it's needed, it should be PLATFORM DEPENDE…

To the Hellbanned user who replied: Well look what "good enough" has brought us now on the web. Constant security issues and a outbreak of for profit blackhats.

...because scuda and others are super safe...

Re: How Bad is DOM Interaction Really?

#34

Earlier quoted context omitted.

I have same feeling, Making single frame of JS code to run fast is cool and dandy, but eventually browser will have to make freeze and do reflow+repaint. Eventually it will make profiling harder, think about caching .offsetHeight etc. properties. It does decrease script execution time, but it does not make your app to work faster.

The important trick to know is, don't mix DOM modification with DOM measurement. Measuring the DOM is what triggers the DOM modification queue to get flushed. if you do something like $('a').each(function(k,e){ $(e).append(' ' ...); var width = $(e).width() // do something with the width; } If you have code like the above, it is going to cause a repaint on each iteration. If you unroll it into three separate loops, o…

It does not trigger repaint on each iteration.

Re: How Bad is DOM Interaction Really?

#35
post #2

After 10+ years as a performance leaning C++ desktop app developer I'm looking for any and all tips to make JavaScript (jQuery too) work in perceivably faster ways. I'm use to threading database calls, using message queues, and views updating themselves from caches. It’s a new world for me and feels somewhat like a step backwards. Here I come html5!

Avoiding writes to the DOM is a good tip for beginners. As a desktop developer, you're going to realize quickly that DOM is decent model for documents, but a terrible paradigm for interactive applications.

Overall performance is terrible and varies widely between browsers. We either need a new standard or a DOM browser battle like what happened with JavaScript, bringing it from 100x to 3x of native.

Re: How Bad is DOM Interaction Really?

#36
post #23

Earlier quoted context omitted.

The DOM is a failed institution trying to grab on the the ledge before it falls into the abyss. W3C should be disbanded and HTML5 abandoned. JavaScript and it's ilk should be boycotted by users as well. This kind of complexity should exist on the server, not in the browser. I understand that people want to run complex apps in the browser. It's a bad idea in general but where it's needed, it should be PLATFORM DEPENDE…

I'm trying to figure out if you're being sarcastic.

You have fun with that, and the DOM. I'm oute

Re: How Bad is DOM Interaction Really?

#37

Earlier quoted context omitted.

The DOM is a failed institution trying to grab on the the ledge before it falls into the abyss. W3C should be disbanded and HTML5 abandoned. JavaScript and it's ilk should be boycotted by users as well. This kind of complexity should exist on the server, not in the browser. I understand that people want to run complex apps in the browser. It's a bad idea in general but where it's needed, it should be PLATFORM DEPENDE…

WTF is this? I don't even know where to begin with this crackpot of a post. You suggested nothing of value and just spout a bunch of FUD. To your friends that agree with you from 2009, use `querySelectorAll` for a non-live NodeList, assuming he has kept up with JS actually having evolved and converging on standards. I bet you flip your lid, too, to learn your server-side-only dystopia is running on top of JS (Node) s…

Can you please not be so abrasive on HN? Your points may be correct, but your tone is exactly what we're trying hard to avoid here.

Re: How Bad is DOM Interaction Really?

#38
post #37

Earlier quoted context omitted.

WTF is this? I don't even know where to begin with this crackpot of a post. You suggested nothing of value and just spout a bunch of FUD. To your friends that agree with you from 2009, use `querySelectorAll` for a non-live NodeList, assuming he has kept up with JS actually having evolved and converging on standards. I bet you flip your lid, too, to learn your server-side-only dystopia is running on top of JS (Node) s…

Can you please not be so abrasive on HN? Your points may be correct, but your tone is exactly what we're trying hard to avoid here.

Ah the white knight. Please please I beg you be nice.
Post reply on HN