Closed cyan-2048 closed 7 months ago
even in today's firefox innerHTML is still quite slow https://andrew.hedges.name/experiments/innerhtml/original.html
oh wow so that's why inferno beats svelte even though inferno uses vdom.. because inferno only uses innerHTML once
even in today's firefox innerHTML is still quite slow andrew.hedges.name/experiments/innerhtml/original.html
That speed test is one of the weirder i've seen lately... I have no idea how he manages to make the innerHTML example so slow - it is nowhere near realistic
Svelte 5 uses cloned document fragments, which avoids any innerHTML
overhead past the initial setup, so I'll close this
Describe the problem
for some reason on older browsers, rendering DOM Elements using text is actually slow(this is based on my experience with KaiOS 2.5 app development).
another problem with using innerHTML is that it preserves the whitespace and won't minify the html.
Describe the proposed solution
create elements
Alternatives considered
keep using innerHTML, but use a template and minify the html... This way a string can still be used, but without having to re-render it.
Importance
would make my life easier