Re: [w3c/webcomponents] Discussion: Templates that Don't Destroy Element References (#777)

> This got me thinking. What if you had a really huge template. Could performance be gained on first render if the "comments" knew how to replace themselves without having to walk the DOM to extract comment nodes?

That's exactly what `TemplatePart` in our proposal does. It's a high performance way of keeping track of objects. There is a lot of interesting optimization opportunities in the browser. Notably, not creating & replacing a node is definitely faster than simply remembering where to insert a node, then inserting it. We can also coalesce multiple insertions depending on the final shape of the API to get even more perf gains.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/777#issuecomment-446027115

Received on Tuesday, 11 December 2018 00:30:20 UTC