Why is saveLayer expensive?

Calling saveLayer() allocates an offscreen buffer
and drawing content into the offscreen buffer might
trigger a render target switch.
The GPU wants to run like a firehose,
and a render target switch forces the GPU
to redirect that stream temporarily and then
direct it back again. On mobile GPUs this is
particularly disruptive to rendering throughput.

When is saveLayer required?

At runtime, if you need to dynamically display various shapes
coming from a server (for example), each with some transparency,
that might (or might not) overlap,
then you pretty much have to use saveLayer().

Debugging calls to saveLayer

DevTools timeline; learn when
your scene uses

DevTools Performance view.

Minimizing calls to saveLayer

Can you avoid calls to saveLayer?
It might require rethinking of how you
create your visual effects: