I'm seeing a massive performance hit from BitmapData.clear(). I've also noticed it eats up memory. I looked at the source code and the bottleneck appears to be from setting the dirty flag to true. If I use BitmapData.context.clearRect() manually, everything works fine. What is the dirty flag doing? Why is it necessary to set it? Perhaps an argument could be added to skip setting it?