Particle System Poor Performance

I’m working on adding the particles to my game. I have dirt, glass, stone particles. When each particle plays the game begins to freeze and I get a ~200 frame drop. Not sure what to think bout it. This is my first time working with unity particles. Forgot to mention that this gameobject is enabled to play and disabled when the particle finishes using startcoroutine. Does it with or without enabling and disabling. Also no difference in performance if I instantiate instead of pooling.

You are running at 400-600 fps. There is no performance problem here.

If something makes your game run at less than 30fps, then you have a performance problem :slight_smile:

Look at the frame time milliseconds value, in brackets next to the fps, to see how much time is actually being spent. If you want to run at 60fps, you have 16ms to “spend”. 30fps gives you 33ms to use.

Anything more than 60fps is usually irrelevant (unless you are doing VR, in which case you may want to aim for 90 or 120fps)

However, if you are getting game freezes too, then something else bad is happening, but I can’t see it from your screenshots - try using the Timeline Profiler to catch the frame spike.

2 Likes

This is the profiler when the particle is bout mid play.

This is the profiler when the particle is done playing and the gameobject gets disabled. You can see everything starting to drop.

This is the profiler when the particle is completely removed from the scene. I remove the particle from the gameobject it sits in and continue to enable and disable it and I get absolutely no performance issues. So it has to be in the particle system. The following images were generated while the particle was removed from the scene. The performance hit I get is the camera becomes extremely jerk soon after the particle starts and 3-4 seconds after its done. once the system settles it goes back to good performance…sometimes. Unity 5.4.0f3.

Edit:
i5 3570k
16gb ram
msi gtx 980 - latest driver

Ran a benchmark and PC is running optimum. I have also ran 2-3 other random particles from the assetstore as well as some found online with the same performance issue. I can also spawn hundreds of trees and force my fps to drop down to ~80 fps with no camera jerk.

OK I found the solution. Found gtx.WaitForPresent function causing the problem. Guess I had way too much fps… apparently that can be a problem. The only thing is it didn’t show on spikes…showed up right after them. Only found it after scrolling through the profiler. Appreciate the help Richard.