RE: RE: optimizing speed of SMIL
"David Dailey" <[email protected]> Thu, 6 Mar 2014 21:24:57 -0500
| Newsgroups | gmane.text.xml.svg.devel |
|---|---|
| Message-ID | <004101cf39ac$6f2cf850$4d86e8f0$@net> |
Hi Brian, Thanks for your answer and for a glimpse into how things might be in the future. I can’t quite see what you mean by breaking out the two transforms. Do you have an example of that? In the simple example at http://cs.sru.edu/~ddailey/fading/slides/ScaleInPlace.svg I’m using this: <image id="J" y="3%" x="3%" width="94%" height="94%" xlink:href='Beijing1354.jpg' preserveAspectRatio="none"> <animateTransform attributeName="transform" type="translate" dur="2s" values="50,50;0,0" repeatCount="indefinite"/> <animateTransform attributeName="transform" additive="sum" type="scale" dur="2s" values="0;1" repeatCount="indefinite"/> </image> In other words, I’m only translating once, so am not sure if your advice would apply. While your thoughts are in this mode, if you happen to see any ways of improving performance of any of the examples at http://cs.sru.edu/~ddailey/fading/slides/transitions.html -- advice would be appreciated. There are a couple that don’t work well in Firefox (not sure if is the same as another one I saw, using some now unforgotten search or not) and, of course the one with compound filters applied to the whole window causes some delay. Cheers David From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, March 06, 2014 6:38 PM To: [email protected] Subject: [svg-developers] RE: optimizing speed of SMIL Hi David, Is it possible to split out the "translate center to origin" and "translate back again" transformations into separate <g> elements and then just use one animateTransform for the scale on the appropriate group? That's worked for me in the past. Typically working with transforms is faster. (In Firefox you turn on paint flashing to see what sort of area is being repainted on each frame which gives you some idea of what is happening under the hood. I've tried it with animateTransform and it has given good results.) Long-term the idea is that user agents will implement the Web Animations model and layer CSS and SVG on top of that. Then if you optimize at the Web Animations model level the optimizations apply everywhere. It will be a while coming but eventually that should mean declarative animation of transforms in SVG also benefits from optimizations like running off main thread etc. Also, in the future it should be possible to use transform-origin to avoid the extra translate. This doesn't work yet in Firefox (see bug 923193 https://bugzilla.mozilla.org/show_bug.cgi?id=923193) and might have bugs when used in combination with <animate> but eventually this should be the simplest and fastest approach. Best regards, Brian [Non-text portions of this message have been removed] ------------------------------------ ----- To unsubscribe send a message to: [email protected] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/