# Game freeze when load Niagara system

**URL:** <https://forums.unrealengine.com/t/game-freeze-when-load-niagara-system/472850>\
**Category:** FX\
**Tags:** unreal-engine, question\
**Created:** [October 13, 2020, 10:08am UTC](https://forums.unrealengine.com/t/game-freeze-when-load-niagara-system/472850 "2020-10-13T10:08:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHIFTUP.DARBY84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SHIFTUP.DARBY84](https://forums.unrealengine.com/u/SHIFTUP.DARBY84)\
**Post date:** [October 13, 2020, 10:08am UTC](https://forums.unrealengine.com/t/game-freeze-when-load-niagara-system/472850/1 "2020-10-13T10:08:10Z")

</div>

When loading NiagaraSystem, a serious hang occurs. As a result of analysis, there are more than 2000 ObjLoadeds in the EndLoad function of UObjectGlobals.cpp. Because of this part, it seems that a freeze occurs during loading.

 ![318517-endload.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/b/84b644907e513cfb4a994475089e718919c7c603.png)

EndLoad-Preload:

```
				for (int32 i = 0; i < ObjLoaded.Num(); i++)
				{
					// Preload.
					UObject* Obj = ObjLoaded[i];
					if (Obj->HasAnyFlags(RF_NeedLoad))
					{
						check(Obj->GetLinker());
						Obj->GetLinker()->Preload(Obj);
					}
				}

```

EndLoad-CondionalPostLoad:

```
				for (int32 i = 0; i < ObjLoaded.Num(); i++)
				{
					UObject* Obj = ObjLoaded[i];
					check(Obj);
#if WITH_EDITOR
					if (SlowTask)
					{
						static const FTextFormat FinalizingTextFormat = NSLOCTEXT("Core", "FinalizingUObject", "Finalizing load of {0}");
						SlowTask->EnterProgressFrame(1, FText::Format(FinalizingTextFormat, FText::FromString(Obj->GetName())));
					}
#endif
					
					FLinkerLoad* LinkerLoad = Obj->GetLinker();
					if (LinkerLoad && LinkerLoad != VisitedLinkerLoad)
					{
						LinkerLoad->FinishExternalReadDependencies(0.0);
						VisitedLinkerLoad = LinkerLoad;
					}
					
					Obj->ConditionalPostLoad();
				}
			}
```
