2

I have read numerous posts online saying native rendering of SVGs on iOS is expensive. My question is why?

SVGs are just images defined as a set of vector graphics which seem to be your typical “paths” and shape in an annotated xml format that supports attributes/metadata.

If we forget about animations for a second it seems like if iOS wanted to support native SVG rendering it seems like all it would need is a layer that could parse the SVG xml and convert the paths and shapes into native CoreGraphics draw commands?

It seems like the very heart of the complexity lies in simply adding this preprocessing step... Is adding this SVG preprocessing step to the draw cycle/main thread extremely costly? I find it hard to believe an XML parser would really be the bottle neck here. I am not an SVG expert so would love anybody in the communities insight here..

AyBayBay
  • 1,726
  • 4
  • 18
  • 37

0 Answers0