How Flash's DisplayObject.cacheAsBitmap saved my life
Tweening displayobjects. That's supposed to be Flash's bread and butter. Animations, movement, things like that. Recently I was coding some Flex 4 stuff, and I was updating the x position of a small element on the page every 100 milliseconds (on a timer). The object overlapped some other custom drawn elements. When the timer was enabled, CPU usage was around 40% (on a dual core, so that's like saying 80% to single thread/core only flash player). It seemed like a small tween/animation. But it was using massively large amount of CPU time. I panicked. This was the first of many tweens that would happen in the project. If it can't even manage one, I'm screwed. So I began investigating. That's when I discovered cacheAsBitmap. No, not on the moving object. But on the objects behind the moving object. I had a row of textfields and a sprite with tons of little lines drawn on it (a timeline that has second mark ticks and a text field every 10 seconds). When I set cacheAsBitmap=true for the sprite and the textfields, CPU went back down to acceptable levels. Phew.
To enable cacheAsBitmap (which is a property on DisplayObject, so anyone descendant from that can do this), you can either in AS3:
var myobject:DisplayObject = getMyDisplayObject();
myobject.cacheAsBitmap = true;
or in mxml:
<s:Group cacheAsBitmap="true" ... ></s:Group>
or any other DisplayObject mxml tag.
Just don't set cacheAsBitmap=true on a mask, or you wont be happy.