Re: [svgwg] [svg-native] Decide whether reusable graphical elements are needed (#689)

@jarek-foksa 

>  are 

```<pattern>
<marker>
<symbol>
<use>
<linearGradient href="...">
<radialGradient href="...">
```

> adding any value when it comes to rendering performance, file read/write performance, security or interoperability?

Absolutely, unless I misunderstand something. They buy you these:

- performance: much more [compact representation](https://codepen.io/monfera/pen/oLoRgX) leading to eg. one DOM element instead of ten, or hundreds, so there's less data to move and parse, and the user agent can optimize fast rendering better
- performance, again (rendering and read/write): there are much fewer DOM elements, so CSS calculations eg. transforms are way faster, experimental results show this clearly - also, even without this, many DOM elements even when they're inert, make things slower to render or update
- security: might not be relevant to native (I'm not super clear on it) but the lessened need for DOM work may mean, less pressure to use JavaScript or any other imperative scripting to populate the scenegraph with tons of repeating elements

-- 
GitHub Notification of comment by monfera
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/689#issuecomment-613611152 using your GitHub account

Received on Tuesday, 14 April 2020 18:36:46 UTC