apple developer

home tech_notes app_store github stackoverflow devto

Improving the Performance of Static Content

Flatten a portion of your node hierarchy to a single texture to improve performance.


An effect node normally discards its private framebuffer after rendering is complete. Rendering the content is necessary because it typically changes every frame. However, if the content is static, discarding the rendered framebuffer is unnecessary, and it might make more sense to keep it.

If the content of the effect node is static, set the node’s shouldRasterize property to true. Setting this property causes the following changes in behavior:

You can use effect nodes to cache static content even when you aren’t applying a filter to the rendered image. This technique can be useful when the contents of a subtree are static and expensive to render.

download this page as .md

download this page as .pdf

back to SpriteKit documentation