📜 ⬆️ ⬇️

Is cacheAsBitmap good?

Earlier I wrote about the speed of rendering in flash and about cacheAsBitmap in particular.

But now I faced a specific question - what is faster - set cacheAsBitmap = true, or translate the image into a raster and load it as a PNG. Provided that the picture is static, but very heavily loaded with different gradients and other things.

To solve the problem, I sketched a small test .
')

Conditions.


Results.

Conclusion.


The conclusion is simple - you can safely use cacheAsBitmap and not be afraid of a performance drawdown.

Moreover, a picture with cacheAsBitmap is so quickly displayed on the screen that the speed does not differ from the option when this picture is not displayed at all.

One need only remember that cacheAsBitmap will not work in the following cases:

Source: https://habr.com/ru/post/114801/


All Articles