3 ms·
I stopped reading when he said that he thought 10000 divs in 200 milliseconds was impressive. That was impressive on a 486 SX. The things that make people go "
by skrebbel 14y ago
I stopped reading when he said that he thought 10000 divs in 200 milliseconds was impressive.
That was impressive on a 486 SX. The things that make people go "woa!" in a browser are, barring WebGL demos entirely made in shaders, completely not-impressive when compared to doing the same outside a browser. This is fine. The browser is expected to handle so many wildly varying use cases at once, it can't be top speed at all of them. But don't go around telling us that something that Firefox does on a 2Ghz quad core PC is amazing when the same has been done on an Amiga 500.
The DOM is slow. It can be used to be fast enough for most purposes.
- amadeus 14y agoAgreed. The DOM is incredibly slow, and his example is so asinine. What is the use case for generating 2000 unstyled divs with one line of text? Try making that into a nice slick CSS list, maybe throw an image in each list item, with some title copy and supporting text. Perhaps you throw a bit of text shadow on it to create a nice beveled effect. Oh yeah, that 2000 divs per 200 milliseconds probably just turned into 10. Maybe even less, maybe 1 or 2 on a mobile browser.
- sophacles 14y agoThis is really taking things out of context. The DOM might be slow compared to your Amiga, but the statement TFA is talking about is within the context of web browsers.
- furyofantares 14y agoThat bothered me too, but if you had read further I think you would have found the introduction misleading. The rest of the rant isn't really about DOM vs native, it's about good DOM code vs bad DOM code.
- NinjaWarrior 14y agoYes, from the viewpoint of a game developer, the DOM is extremely, painfully, awfully, ridiculously slow and completely useless other than static HUDs. With the DOM, we can move only hundreds of sprites at 60 fps (on the latest Core i7!). HTML5 Canvas can achieve thousands but it's also far from native (and the function of Canvas is very poor). WebGL can gain acceptable performance in many situations, but there is still much overhead. I suspect today's most web developers don't know the true performance of computers they are actually using.