Issue Introduction
I’ve been playing with streamlines
for quite a long time. And actually it helps us a lot to find our performance issue.
In our project, camera view point information is required in a lot of places. By default we use function like APlayerCameraManager::GetCameraViewPoint
to get exactly what we need.
However we’ve found that a strange function cost:
So it seems that a copy construction of FMinimalViewInfo
is performed here:
And yes, there is a FPostProcessSettings
, a complex struct, inside a FMinimalViewInfo
. And this can cost a considerable CPU performance.
Issue Solution
Well we simply avoid copy construction of FMinimalViewInfo
and directly return those result required. This can save some performance.
An Irrelevant Note
Well… I just need a place to write this down since I always forget this feature.
If you want a detailed performance information about slate performance. You can visit slateglobals.h
to find more information.