3 ms·
I'd add a couple of things. 1. as sizes grow you'll be better off using CSS to style rather than attributes -- this will often be a much bigger win than fiddli
by tomgp 9y ago
I'd add a couple of things.
1. as sizes grow you'll be better off using CSS to style rather than attributes -- this will often be a much bigger win than fiddling around with #00f vs blue.
2. I think replacing rect's etc. with paths can be problematic esp if you want to animate elements based on attributes i.e. much easier to interpolate from width=10 to width=20 than figure out what the intermediate path commands might look like. Also, if you want people to be able to edit the resulting SVG keeping with semantically meaningful higher level features such as rect and circle will help editors to understand what's going on and provide the power tools for modifying those shapes
- tomgp 9y agooh, also, in my experience the best optimization tends to be reducing the number of decimal places in complex path commands to one or two.
- Already__Taken 9y ago> i.e. much easier to interpolate from width=10 to width=20 I know it's specific example but don't browser rules apply here? i.e this should be a scale transform not an element property modification to take advantage of the gpu?
- a_e_k 9y agoThe problem with a transform like that is that it would also scale line strokes.