Search Issue Tracker

Won't Fix

Votes

1

Found in

6000.0.54f1

6000.1.13f1

6000.2.0b12

6000.3.0a3

6000.4.0a1

Issue ID

UUM-112783

Regression

No

Unused Particle System Renderer Mesh settings cause performance degradation when calling SetActive

-

Reproduction steps:
1. Open the attached “IN-107528.zip” project
2. Open the “PerformanceTestScene” Scene
3. From the Hierarchy, select the “Performance Test Script” GameObject
4. In the Inspector, find the “Prefab” property in the “Game Manager” Component
5. Assign “Prefab - Particle System (SLOW - hidden mesh)” prefab to “Prefab” property
6. Open the Profiler Window (Window > Analysis > Profiler)
7. Enter Play mode
8. Select any of the Frames in the CPU Usage
9. Switch to Hierarchy view in the Profiler
10. Locate both the Instantiate.Awake and GameObject.Activate entries in the Hierarchy
11. Observe their ”Time ms” values

Expected result: ”Time ms” values for GameObject.Activate is ~0.01ms and for Instantiate.Awake is ~0.04ms
Actual result: ”Time ms” values for GameObject.Activate is ~1.5ms and for Instantiate.Awake is ~1.4ms

Reproducible with: 2022.3.64f1, 6000.0.54f1, 6000.1.13f1, 6000.2.0b12, 6000.3.0a3

Reproducible on: Windows 10 (user reported), Windows 11
Not reproducible on: No other environment tested

Note:
- The expected result comes from comparison, where in the 5th step, “Prefab - Particle System (FAST - no mesh)” prefab is assigned instead. The settings are visually the same between inside one prefab and between the slow and the fast prefabs. The only difference is that on the “slow” prefab, old Renderer Mesh settings are still processed. To demonstrate how to fix it, open the “Prefab - Particle System (SLOW - hidden mesh)” prefab -> select all Particle GameObjects → In the Inspector go to the Rendered tab → Set the “Render Mode” to “Mesh” → In the “Meshes” property click on the circle and select None → Set the “Render Mode” back to “Billboard”. Now the “slow” prefab have the same performance as the “fast” one

  1. Resolution Note:

    Thank you for reporting a bug to Unity.

    We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug.

    The reason why you are seeing an slowdown is because the hidden mesh still needs to be cached, as Render Mode can be changed in runtime. If you really don't need the mesh, the fix is very simple:

    - In Renderer category, change Render Mode to Mesh.
    - Remove the reference to the mesh.
    - Change Render Mode back to Billboard.

    This will also remove the dependency on that mesh asset, for instance when creating a build.

    We acknowledge that it would be possible to cache on-demand, but fixing that would involve risk of a regression.

    Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.

Add comment

Log in to post comment