Can {@htm 'svgRaw'} affect performance? #15639
-
unplugin-icons and I are looking into the performance issue of rendering icons in svelte ❤️ And here we have a question Are we right to create icon components with Could this affect performance? @dominikg As far as I know, you helped integrate svelte into unplugin-icons Our issue: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
which performance issue? the one you linked leads to #11405 which seems resolved. in theory |
Beta Was this translation helpful? Give feedback.
I rechecked my results and concluded that
{@html }
slows down html renderingHere are my results for 10000 svg elements:
<svg>
: [500, 700, 600]ms avg: 600{@html '<svg>'}
: [1500, 1800, 1700]ms avg: 1666Accordingly,
@html
does this work ~177% slowerAnd the speed decreases exponentially depending on the number of elements
When running Record at Perfomance in DevTools, this is particularly noticeable
REPL: link