Re: [w3c/webcomponents] Template/part proposals should explain how and why they improve performance (#901)

One area of performance gain is the ability to clone a subtree with `parts` where the cloned `parts` reference cloned nodes in the new subtree.  The use case was discussed in our virtual F2F meeting. After cloning a node tree,  JS frameworks need to find references to the new nodes created, usually through some attribute markup.  With the new `Node.cloneTree()` API,  `parts` are returned along with the cloned node tree, eliminating the needs to look for these nodes in the new tree. 

Another performance benefit that we didn't discuss could be eliminating mutation events during batch updates in the commit phase.  Mutation events are depreciated, and this new API doesn't need to keep support them. 

This is theoretical. There could be more areas of improvement. We'll need to do a prototype to accurately measure any performance benefits. 

-- 
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/901#issuecomment-717627879

Received on Wednesday, 28 October 2020 00:54:33 UTC