Live data from Hacker News

SVG can do that?

slides.com

11–20 of 202 posts

Re: SVG can do that?

#11
SVG has the opposite performance profile of Canvas.

SVG hits a performance ceiling as number of elements increases. Canvas, since it's rasterized image can handle a rasterized representation of millions of SVG elements.

However as Canvas dimension increase, it will hit a performance ceiling.

Re: SVG can do that?

#15

SVG has the opposite performance profile of Canvas. SVG hits a performance ceiling as number of elements increases. Canvas, since it's rasterized image can handle a rasterized representation of millions of SVG elements. However as Canvas dimension increase, it will hit a performance ceiling.

In my experience, canvas 2D also has a number-of-elements performance ceiling if you're drawing things rather than using images, which feels like it defeats the purpose.

For example, try drawing hundreds of coloured rectangles per frame. Easy, right? If you're using WebGL, or any sensible graphics API, yes. If you're using canvas, the web-browser will parse and re-parse your colour expression CSS n times per frame. Enjoy your 100% CPU usage.

Re: SVG can do that?

#16

Wow, svg sits there and does mostly nothing on my phone. Just like Flash! Can't pinch to zoom to read the text that was too small, just like Flash! Half the supposedly neat interactive gewgaws like "turn this gear" didn't react to any presses or gestures at all. Just like Flash!

Are you clicking on the animated gif of the demo or did you follow the link to the demo?

Re: SVG can do that?

#17
post #13

Earlier quoted context omitted.

What image format do you recommend that would work better on a screen reader?

The article is proposing SVG for rendering responsive text for articles. So the screen reader comment is valid.

The text is all there, isn't? The first demo I liked at used svg to rearrange the page, but all the text would render like normal. Probably even works with a text only browser.

Re: SVG can do that?

#18

Wow, svg sits there and does mostly nothing on my phone. Just like Flash! Can't pinch to zoom to read the text that was too small, just like Flash! Half the supposedly neat interactive gewgaws like "turn this gear" didn't react to any presses or gestures at all. Just like Flash!

In the OP's linked slideshow those are just videos playing and not interactive demos (except for the CodePen one)

Re: SVG can do that?

#20
SVG is good as long as it's not abused.

All the kb saving are meaningless with performance issues caused by lots of nodes, gradients, etc.

It's great for responsive icons, but for a full interactive UI with illustrations bitmaps are the better choice IMO unless you really need dynamic scaling.

Just because you can do it doesn't mean you should.

Post reply on HN