I was wondering if I should be concerned about performance / any memory issues if I'm creating GIF-like effects by rapidly cycling between multiple SVG elements?
For the sake of resolution and to maintain accurate transparency I'm not using actual GIFs for this effect. Basically in React, I have an array of SVGs created like
const svg1 = () => { return <svg>...</svg> };
const svg2 = () => { return <svg>...</svg> };
...etc.
And to make the animation, I cycle through them, rendering only one at a given time.
I'm wondering if it's better to have all SVG elements already in the DOM and just modifying the opacity of each? And also for future reference, how I can benchmark this performance myself?