Search Unity

Selecting particle systems slows the editor down to less than 10 FPS

Discussion in 'Editor & General Support' started by Deleted User, Jun 29, 2018.

  1. Deleted User

    Deleted User

    Guest

    This is something i have not encountered before, perhaps i have accidentally messed with something. Starting just a couple days ago, every time i create a new particle system or select an existing one the editor grinds to almost a complete halt until I deselect the system. This effect doesn't happen when selecting a parent with a child particle system, only the system itself. It is making it impossible to create and edit particle systems, which really sucks. As a side note, existing particle systems work perfectly in game, and the lag effect happens even when the particle system is not emitting any particles.

    I'm getting desperate at this point, any help would be greatly appreciated!
     
    funkerflug likes this.
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    You could try to use the Unity Profiler ("Profiler Editor", perhaps using "Deep Profile") to check if it provides any insight in what's going on.

    Here are a few resources that should help you to get started with the Unity Profiler.

    Learn how to diagnose common performance problems and optimize your projects:
    https://unity3d.com/learn/tutorials/topics/performance-optimization


     
    Deleted User likes this.
  3. Deleted User

    Deleted User

    Guest

    I looked at the profiler, there is definitely something gone horribly wrong. I opened the profile, and then created a new default particle system. The CPU usage exploded filling the entire profile with the "other" category all the way to the top. bringing the editor down to 15 FPS. What is even more bizarre is that when the game is running (either in build or in the editor) the particle systems do not create any lag, even when selected. So the problem only presents itself when i have any particle system selected in the editor with the game not running.

    I've attached a gif of this happening
     
    Last edited by a moderator: Jun 30, 2018
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    In order to find what might cause the performance drop, you need to dig deeper in the Profiler.

    Once the Profiler recorded a few slow frames, disable "Record" and select one of those slow frames in the Profiler chart. Then start expanding the most expensive items in the list below. This should provide more insight what's slow.

    Just watch the videos I linked to earlier to find out how to use the Profiler in more detail.
     
  5. theGreatSlutze

    theGreatSlutze

    Joined:
    Jan 7, 2013
    Posts:
    25
    I'm seeing this too in 2019.2.0f1 (on a MacBook Pro that's otherwise pretty good). I tried digging into the profiler and found this:

    upload_2019-8-13_10-23-26.png

    I have no idea how to get more info out of FlushDirty there. This makes it almost impossible to work with particle systems so I'd love if anyone has any suggestions about how I might work around this.
     
  6. MattVLSG

    MattVLSG

    Joined:
    Apr 2, 2018
    Posts:
    43
    upload_2019-8-21_14-54-26.png

    Same here - only recently as well. On 2019.2.0f1

    It's making it very hard to do any particle work... the above spike (2 seconds) occurs everytime a parameter is changed on the particle system. Start size, speed... any parameter.
     
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Can you expand "ParticleSystem.EndUpdateAll" and if there are other items inside, expand these as well? Basically drill down until the Profiler shows what this cost is.

    Btw, any chance you use the Noise Module? This one can be quite expensive depending on its settings.
     
  8. MattVLSG

    MattVLSG

    Joined:
    Apr 2, 2018
    Posts:
    43
    Seems after deleting and adding the PS again this behaviour has stopped... I'll post more Profile details if this happens again!
     
  9. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    it is something in MaterialEditor.OnEnable

    Same thing occurs in 2019.1.0f2 with a default particle system selected in scene view. It allocates half a megabyte each frame and slows down the editor to <10 fps, so it is not possible to edit shuriken particle systems.

    After closing the scene view and deleting the particle system it seems to fix itself, very random.
     
    Last edited: Sep 16, 2019
  10. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    I'm having the same issue on a pretty good iMac 2019.2.6f1. Particle system and forcefield only thing in scene.

    When I try to edit a number in inspector, I get a massive spike:
     
    Last edited: Sep 21, 2019
  11. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    Profiler:
     

    Attached Files:

  12. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    I'm having an issue where clicking on a particle system freezes the editor for 30 seconds or more.
     
  13. mhardy

    mhardy

    Joined:
    Apr 3, 2011
    Posts:
    48
    I'm having the same issue. This is making work impossible. "Scripts" appears to be causing the problem.



    Things I've tried:
    - Close Unity, Delete Library folder, restart Unity in default PC platform, create new scene, add particle system - No Problem.
    - Change to Android platform, create new scene, add particle system - PROBLEM.
    - Change back to PC platform, PROBLEM.
    - Reboot computer, still in PC platform, No Problem
    - Switch to Android platform, PROBLEM
    - Reboot computer, still in Android platform, PROBLEM

    It appears, no matter what I do, when I switch over to Android the problem appears.

    9,820 GC.Alloc's, I suspect this has something to do with it but why? How is this fixed?
     
    Last edited: Jul 16, 2021
  14. shahzaib74

    shahzaib74

    Joined:
    Jul 4, 2019
    Posts:
    2
    I solved it. Go to edit > playerSetting > Quality. Set the quality to medium or low and change the vSync Count to Don't Sync.
     
  15. mhardy

    mhardy

    Joined:
    Apr 3, 2011
    Posts:
    48
    Unfortunately my vSync was already set to Don't Sync and quality had no effect. My profiler shows UpdateSelection is the problem, but everything I've tried has no impact on it. It's something editor specific though because it runs perfectly fine on devices.
     
  16. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    515
    Appplication.UpdateScene goes on forever now that I added a particle system ... How can this be troubleshoot ?

    Put a debugger breakpoint and seems stuck in Jit compiler

    upload_2023-2-21_12-1-39.png