Not approved.

Issues:

1) Is there evidence that this is a performance bottleneck?  It seems like you 
are proposing a solution that you are not happy with for a problem that has not 
been reported.

2) If the goal is to compute all the new animations and then only apply the 
cumulative animation at the frame rate, then it seems to me we would be better 
off spending our time (re-)implementing the concept of a display list.  Then 
you would, on each frame, walk the display list, calculate the new values, and 
apply the values.  This would be much more efficient than creating all these 
individual animators that are trying to synchronize with themselves through 
shared variables on each attribute.

3) I'd like to see a unified idle kernel but I have issues with your changes:

a) you dropped an important comment that documents an invariant "// don't add a 
callback multiple times"

b) moving the slice(0) operation means you are going to create unnecessary 
copies of the array when there is no need to.  I don't understand why you did 
that.

Comments:

1) I don't see updatecounterkey declared

2) Why did you change the name of updateCounter to __setCounter?  Since it 
takes a delta, it isn't setting is it?

3) I don't understand the difference between counterkey and updatecounterkey.  
They seem to be duplicates?

On 2010-06-05, at 23:33, Max Carlson wrote:

> Change 20100605-maxcarlson-o by maxcarl...@friendly on 2010-06-05 19:36:35 PDT
>    in /Users/maxcarlson/openlaszlo/trunk-clean
>    for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Make animators more efficient when animating the same attribute
> 
> Bugs Fixed: LPP-9088 - Make animators more efficient when animating the same 
> attribute
> 
> Technical Reviewer: ptw
> QA Reviewer: hminsky
> 
> Details: I'm sending this out so someone else can take a look.  It makes 
> animators more efficient when animating the same attribute, but that causes 
> some visual artifacts in swf10 - which still uses enterframe events to drive 
> the idle queue.  If I switch to using setInterval (kernel/LzIdleKernel) the 
> jitteriness goes away but the framerate drops to match that in swf8.  Maybe 
> the right thing to do is only do this for swf8/dhtml runtimes, unless folks 
> have more ideas.
> 
> swf9/Library - Comment out swf9/LzIdleKernel
> 
> kernel/Library - Include kernel/LzIdleKernel for all runtimes
> 
> LzIdleKernel - Update to compile in as3.
> 
> LzAnimatorGroup - Update comments to prevent warnings, Remove unneeded test, 
> add ignore arg to __LZhalt() so it can be called from delegates.  destroy() 
> shouldn't try to remove itself when the immediateparent is null.
> 
> LaszloAnimation - Call __LZhalt() after an idle event to allow the system to 
> settle - this prevents extra animators when onstop calls animate().  Add 
> counter key to track number of updates per-attribute.  Rename updateCounter() 
> -> __setCounter().  Inline setValue() into update().  When more than one 
> animation is running on the same attribute, use update counter to only call 
> setAttribute() once per cycle.
> 
> Tests: Testcase from LPP-9088 performs much better in swf8, dhtml.  Also runs 
> in swf10, but animation looks jerky when using enterframe to drive the idle 
> queue.
> 
> Files:
> M       WEB-INF/lps/lfc/kernel/swf9/Library.lzs
> M       WEB-INF/lps/lfc/kernel/Library.lzs
> M       WEB-INF/lps/lfc/kernel/LzIdleKernel.lzs
> M       WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
> M       WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
> 
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/20100605-maxcarlson-o.tar


Reply via email to