acceleratedRendering is my friend

Roger Eller roger.e.eller at sealedair.com
Wed Jun 27 11:17:34 CDT 2012


On Wed, Jun 27, 2012 at 11:57 AM, Thomas McGrath III wrote:

> After sitting with Mark W. for an hour over lunch yesterday I was able to
> both understand the role of acceleratedRendering and the best usage of it.
> It turns out that the order of when these commands are used is of utmost
> importance. I have been rewriting my code and have an instant increase in
> responsiveness in my scrolling groups.
>
> In a nut shell:
> 1. on preopenCard - set the acceleratedRendering of this stack to true
> (only on cards that ave scrolling or dynamic groups/objects
> 2. Immediately before moving an object turn on dynamic or when scrolling a
> group turn on scrolling
> once moving the scroll or object has already been cached and drawn so
> these are no longer necessary. No need to turn these things on and leave
> them on because they are not needed and the result is that things will
> actually slow down.
> 3. Immediately after moving or scrolling an object turn off the scrolling
> or dynamic settings
> 4. on closeCard - set the acceleratedRendering of this stack to false
> (turn it off since it is not needed)
>
>
> This simple approach seems so obvious now and has immediate results.
>
> The other thing that Ben and Mark showed me was that having large
> scrolling groups of object is much much much faster than using visual
> effects and switching cards.
>
> More as I grok this….
>
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> 3mcgrath at comcast.net
>
>
Tom - Thanks for sharing this knowledge nugget!  I too have been trying
unsuccessfully to understand acceleratedRendering.  This is helpful.

~Roger


More information about the use-livecode mailing list