reduce-draw-calls
Cut draw calls
Measure first with app.stats.drawCallCount or MiniStats; the per-pass app.stats.drawCalls
breakdown fills only in profiler builds. Also halve the pixel ratio and call app.resizeCanvas():
if frame time drops, the cost is fill rate, not draw calls. Stop at the first rung that meets the
budget and report before-and-after counts.
1. Stop drawing hidden things
An element at opacity 0 still draws. Set enabled = false.
2. BatchManager
Call app.batcher.addGroup(name, dynamic, maxAabbSize), then set batchGroupId on render, sprite,
or element components. Use dynamic: false for geometry that never moves. Members join when
enabled in the live tree, in any order, and groups regenerate automatically when membership
changes. Call markGroupDirty(id) only after moving members of a static group. Manual AppOptions
bootstraps must set batchManager.