Live data from Hacker News

Better than templates, building highly dynamic web pages

blog.fastmail.fm

1–10 of 44 posts

Re: Better than templates, building highly dynamic web pages

#3
My browser does 10,000 operations / second with innerHTML, and 15,000 operations / second with DOM. In every ajax application I've ever made, this is negligible, compared to latency, server processing time, and downloading time.

I guess this saves you 1ms for every 30 elements you create? I'm sure there are some cases I'm missing where this might make more of an impact, but from my understanding of the article, this looks like a pretty small improvement.

Re: Better than templates, building highly dynamic web pages

#9
When I do this, I do it with Kris Zyp's put selector [1]. Creates new elements, modifies existing ones. It's the only DOM manipulation API I like besides jQuery.

[1] https://github.com/kriszyp/put-selector

That said, I don't do this very often because the designers I work with prefer templated markup.

Post reply on HN