SVG optimization tips required

Discuss SVG code, accessible via the XML Editor.
coder

SVG optimization tips required

Postby coder » Tue Jun 01, 2010 11:19 pm

Hi folk,

Currently i am working on SVG,I need optimize the SVG.So could you please suggest me the better ways to

optimize the SVG content for embedded target,.And i would like to know is there any possible steps to convert path to polygon

used in the SVG.


Thanks in advance

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: SVG optimization tips required

Postby tomh » Wed Jun 02, 2010 3:26 am

First 2 caviates: 1, I have never produced svg files for embedded systems before. 2 I don't have a copy of inkscape infront of me at the moment. this is done from memory...

File size. Can be done by

1)File -> Vacume Defs
2)File -> Save As -> Optimised SVG (scour, see http://www.codedread.com/scour/ )
3)set the "max precission" and significant didits in the inkscape prefrances (prefrances -> Svg output???)


Rendering performance. Harder...

0)Check SVG Tiny/Basic/full diffrances: http://www.w3.org/TR/SVGMobile/
1)Avoid filters and clip/mask, which needs additional compositing in the render
3)remove unused items from canvus - check for hidden objects / obscured objects / objects off canvus / so small you can't see them objects, check out outine view mode, can be helpfull
2)simplify geometry (control+L ??), edit the path data and make sure straite lines are not acully spline curves (see :tool_node: toolbar)
3)use fill="RRBBGG" instead of css style atubutes, think optimised svg output has this option?

coder

Re: SVG optimization tips required

Postby coder » Wed Jun 02, 2010 2:22 pm

Hi tomh,

Thanks a lot for giving me such a valuable information.And i am having some more doubts like how we can reduce the number of polygon count and as i aware that SVG paths are straight lines or quadratic, cubic or quartic bezier curves is there is any possible ways to convert path to polygon,

Thanks in advance


Return to “SVG / XML Code”