template-extensions icon indicating copy to clipboard operation
template-extensions copied to clipboard

AssignedTemplateInstance performance

Open luwes opened this issue 1 year ago • 1 comments

Related to https://github.com/luwes/template-extensions/blob/b9e024b2dc9872c04df900074e3c1362ee0d8371/src/assigned-template.js#L30-L45

Parsing and creating DOM parts first on a dummy template to then transfer them over to the SSR'd DOM is quite an expensive operation if wanting top performance. Fine for 90% of use cases, it's as fast as React's hydrate call.

Not needing to ship the full HTML template w/ expressions for the SSR'd content (watch out for conditional branches, these will still need the full HTML template!) is another reason to have the selector representation available straight from the server.

luwes avatar Dec 31 '22 15:12 luwes