DEV Community

Cover image for Unity Memory Optimization: How to Identify Unused Prewarmed Particle Systems with GOT Online
GameOptim
GameOptim

Posted on • Edited on

Unity Memory Optimization: How to Identify Unused Prewarmed Particle Systems with GOT Online

๐ŸŒ Website: www.gameoptim.com

Why does the GOT Online report show particle system memory continuously increasing to over 100MB, even though no large number of new effects have been added to the scene and no particle effects appear to be playing during runtime? How should this be investigated?


A

Many projects use a particle system prewarming strategy. When entering a battle or gameplay scene, particle effect instances are instantiated in batches and organized into pools based on particle types. When an effect is needed, it can be activated directly from the pool instead of being instantiated at runtime.

The advantage of this approach is that it helps avoid runtime stutters caused by object instantiation. However, it also has a trade-off. If the object pool does not implement a proper recycling mechanism, particle systems and their associated resources may remain resident in memory for a long timeโ€”even if they never emit a single particle during gameplay.

GOT Online provides a very useful filter:

Particle System Assets with a Peak Playing Component Count of 0

After enabling this filter, you can quickly identify particle systems that are still occupying memory but whose Peak Playing Component Count remains 0. In other words, these are particle systems that have been prewarmed but have never actually been triggered since the beginning of the profiling session.


In this example, the report shows that particle systems consume more than 100MB of memory. After applying the filter, a significant portion of that memory belongs to particle systems whose Peak Playing Component Count is 0. These assets were preloaded into the object pool but were never actually used.

A recommended investigation workflow consists of three steps:

Step 1: Check the particle system memory trend.

If particle memory increases in clear step-like increments instead of changing smoothly with scene transitions, it is likely that particle systems are being prewarmed in batches.

Step 2: Measure the proportion of particle systems with a Peak Playing Component Count of 0.

If a large percentage of particle systems fall into this category, the current prewarming strategy may be too aggressive.

Step 3: Group assets by their resource paths.

GOT Online allows you to trace resource paths up to five levels. You can categorize particle systems by asset typeโ€”such as skill effects, environment effects, or UI effectsโ€”to identify those that have never actually been played. Based on the results, you can decide whether they should be loaded on demand or removed from the prewarming list.


It is important to note that a Peak Playing Component Count of 0 does not necessarily mean a particle system will never be used. It simply indicates that it has not been triggered up to the current sampling point. Before modifying your prewarming strategy, you should evaluate each effect based on its actual usage frequency and gameplay requirements to avoid removing low-frequency but mission-critical effects.

Prewarming itself is not the problem. The real issue is when particle systems remain in memory for long periods after prewarming without ever being used. An effective prewarming strategy should always be aligned with the actual frequency at which particle effects are triggered.

Top comments (0)