FExclusiveLoadPackageTimeTracker

A singleton to keep track of the exclusive load time of every package.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/Misc/ExclusiveLoadPackageTimeTracker.h

Include

#include "Misc/ExclusiveLoadPackageTimeTracker.h"

Syntax

class FExclusiveLoadPackageTimeTracker

Remarks

A singleton to keep track of the exclusive load time of every package. Also reports inclusive load time for convenience. The code that loads packages "pushes" a load on the tracker which will record the time the package started loading. Later that package will be "popped" which will cause the tracker to record the time spent. If another package is pushed while this is happening, it will pause the time recorded from the first package and start a new time for the second. This is recursive. DumpReport() can be used to log out all the recorded values in a couple different ways to get an idea about what packages are the slowest to load.

Functions

Name Description

Public function Static

void

 

DumpReport

(
    const TArray< FString >& Args
)

Displays the data gathered in various ways.

Public function Static

double

 

GetExclusiveLoadTime

(
    FName PackageName
)

Returns the load time for the specified package, excluding its dependencies

Public function Static

double

 

GetInclusiveLoadTime

(
    FName PackageName
)

Returns the load time for the specified package, including its dependencies

Public function Static

void

 

PopEndLoad()

Records some time spent in "EndLoad"

Public function Static

void

 

PopLoadPackage

(
    UPackage* LoadedPackage
)

Records a time and stats for the loaded package.

Public function Static

void

 

PopPostLoad

(
    UObject* PostLoadObject
)

Records a time and stats for the loaded package.

Public function Static

void

 

PushEndLoad()

Starts a time for time spent in "EndLoad"

Public function Static

void

 

PushLoadPackage

(
    FName PackageName
)

Starts a time for the specified package name.

Public function Static

bool

 

PushPostLoad

(
    UObject* PostLoadObject
)

Starts a time for the specified package name.

Public function Static

void

 

ResetReport()

Resets the data.

Classes

Name

Description

Public struct

FScopedEndLoadTracker

Scoped helper for EndLoad

Public struct

FScopedPackageTracker

Scoped helper for LoadPackage

Public struct

FScopedPostLoadTracker

Scoped helper for PostLoad

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss