Performance: Sub-emitters
MEDIUM IMPACT
Sub-emitters affect the rendering performance and frame rate by adding extra particle systems triggered by parent particles.
Use fewer sub-emitters with optimized particle counts and lifetime; Reuse particle systems with pooling instead of creating new ones each time.
var subEmitter = new ParticleSystem(); subEmitter.Emit(100); // Each particle triggers a new sub-emitter with many particles
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Many sub-emitters with high particle counts | N/A | Multiple GPU draw calls | High GPU rasterization cost | [X] Bad |
| Optimized sub-emitters with pooling and fewer particles | N/A | Single GPU draw call batch | Lower GPU rasterization cost | [OK] Good |