Optimised SVG generation