XML technologies / SVG / Interactive graphics / Manipulating graphic elements / Manipulating the visible property / Optimizing display

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

Testing the graphic reveals rather slow rendering, partly because gradients and filters take considerable time. Avoiding them is the only way to change that part. SVG Viewer itself probably also needs optimization, so the next version may improve things. You can nevertheless speed up the graphic somewhat by having parts rendered for speed instead of optimal appearance. Simply add to the <svg> tag a style attribute with specific values.

<svg width="800" height="600" style="shape-rendering:optimizeSpeed;text-rendering:optimizeSpeed">

The setting shape-rendering:optimzeSpeed tells graphic elements such as rectangles, circles and paths to be drawn as quickly as possible; text-rendering:optimizeSpeed does the same for text elements. Both disable the antialiasing effect.

Note:
These settings do not affect filters or lighting effects. Substantial acceleration therefore requires omitting them.

   

 

 

 

back to top