RE: SVG vs canvas performance

I, as sometimes happens, may be missing something critical in this discussion, but circa 2006 I found I was able to place about 100 independently targeted, individually behaving, SMIL animated objects in an SVG screen with collision detection and user-interaction in the browser of the day. Just how many fishies do you want in your aquarium? 

See for example [1], [2], [3], [4],[5]. Most require Opera or IE/ASV because of feDisplacement and SMIL, though some work fine in FF4+. An odd-numbered one might work in Chrome.

In [4] the eggs have their speed and directions set by the user and their shapes are deformed by feDisplacement formed by the animated gradient (though Opera is still a wee bit buggy here). In [5], a screenful of moving things with semantic connectivity is enabled (click to add new ones). In [3], the objects, as added by the user, have paths set by random bezier curves, with changes in size and orientation given by SMIL. The shapes of paths may also be animated. [2] seemed to work everywhere in the world in 2006 except in Cupertino.

The discussion of thousands of tiled images being swapped in when we have SMIL to deform the shapes of things just seems sort of silly to me, but perhaps a score of graphic illustrators to create all those images is cheaper than hiring a person who can use declarative animation? I knew there must be a reason for <canvas> coming into existence!

cheers
David

[1] http://www.svgopen.org/2007/papers/BrowserPerformanceMeasures/index.html
[2] http://srufaculty.sru.edu/david.dailey/svg/swatch3.svg
[3] http://srufaculty.sru.edu/david.dailey/svg/svgopen2008/makestars4.svg
[4] http://srufaculty.sru.edu/david.dailey/svg/eggcloning3.svg
[5] http://srufaculty.sru.edu/david.dailey/svg/graphs30.svg

________________________________________
From: public-html-request@w3.org [public-html-request@w3.org] On Behalf Of Karl Dubost [karld@opera.com]
Sent: Sunday, July 17, 2011 10:07 AM
To: robert@ocallahan.org
Cc: HTMLWG WG; Canvas
Subject: Re: SVG vs canvas performance

Le 16 juil. 2011 à 07:29, Robert O'Callahan a écrit :
> I'm very doubtful they'll ever be as fast in SVG as in canvas, especially if
> the canvas code has been hand-optimized to use explicit tiling.

Just by curiosity because I'm not knowledgeable enough. Do you think it could be faster if it was fish as 3D object (VRML type) instead of 2D object (multiple SVG)?



--
Karl Dubost - http://dev.opera.com/
Developer Relations & Tools, Opera Software

Received on Sunday, 17 July 2011 14:55:39 UTC