ParticleSystem memory overhead

I’m running Unity 4.3.1 and just noticed what appears to be a massive memory overhead when using the new ParticleSystem rather than the legacy particle emitter, animator, and renderer components. Using ParticleSystems appears to significantly increase Scene Memory in the profiler.

I just ran a test, building two “particle systems” that display a single snowflake with animating color. One system was created by adding an ellipsoid emitter, animator, and renderer to a game object. The other was created with a single ParticleSystem component on another game object. The two systems result in particles that are visually identical.

I then profiled two scenes, each with 30 instances of one of these test systems.

Here’s the Scene Memory snapshot from the legacy system:

And here’s the snapshot from the scene using ParticleSystems:
1718694--108404--upload_2014-7-31_13-51-16.png

Notice nearly a 300k increase in scene memory when using the ParticleSystem objects?

That 300k increase jumps to a 30 meg increase in our actual game which implements many simultaneous “particle systems”.

I haven’t had any luck researching memory overhead of the new ParticleSystem component, so I’m curious if anyone else has knowledge to share…?

Why is there such a massive overhead?

Switching all our particles back to the legacy system will take considerable time, hence I’m hoping that there’s just something I’m overlooking as to the optimization of ParticleSystems.

Thanks for any insight!

running into the same here…we are ended up with 50-70mb or ParticleSystem usage in ours…going to ave to find way to cut that way down :frowning:

I’ve noticed this also on the 5.3.6f1. I have a pooling system and it’s taking nearly 30-40mb to keep instances alive.

Particle systems allocate the amount you specify as Max Particles in the particle system. To reduce memory you would cap this amount. If it only spawns a few, don’t allocate the default thousand. 30 x 1000 = 30,000 obviously, so this is going to be 30,000 times Unity - Scripting API: Particle

I haven’t tested this, but it seems logical enough.

1 Like

with more testing and profiling even a basic particle system with only a few particles set is going to take a lot of memory. much more than expected. we switched some things that we were using particle systems for to fixed animations instead to save some space. be care of using particle systems when you don’t really need to and if you have to use them with lots of instances of them.

Thanks it did help a bit hippocoder. I found out it’s also because the use of mesh vertex based emitters. I guess it has to store that info but I don’t see why it can’t be shared amongst instances. I also noticed a bug where even if you switch the emitter type to a shape based one it still allocates memory for the vertex based emitter. It doesn’t clear that reference on the serialised object. I’ll file a bug for those.

Actually it looks like even the most simple particle will use 8.9kb per instance.

47.4Kb per instance in 2018.3.0. Even when the system is set to a max of 25 particles.

1 Like

49.6 Kb per instance in 2019.2 Unity Issue Tracker - [Particle System] Increasing memory usage between each version

Anyone know if this is still an issue or has it been addressed

Bump, also looking into this. Have a bunch of particle systems in our object pool taking up 50MB memory on mobile devices.

This is still an issue, spawning a bunch of spheres throws errors about my computer running out of RAM
Seriously? I just got like 200 mesh spheres…