Hi,
I hope someone can help me here, because I am gradually becoming desperate to get this running.
I am using a ThirdParty library, everything works well but when deploying for HoloLens performance gets really bad and i started to track down the issue.
This led me to Unreal Insights, a very powerful tool, also suitable for in-depth analyses for my PhD
Then i found the folder Runtime/Tracelog containing some standalone-named files and create_standalone.py for creating a single-header library trace.h.
I included trace.h to my ThirdParty library build (needed some modifications as it was not useable just after generating by the python script) and with some more work i managed it to get at least a event entry in the Unreal Insights trace, triggered from the third party library. But Counts and Timings are zero and still missing.
I could not found any documentation, so any hint how the output ofcreate_standalone.py is intended to use? Or I`m completely on the wrong track?
Thanks!
Ok, i found a solution (or workaround) myself. It seems the standalone-files are meant to be really for standalone builds which are not used inside UE. Otherwise redefinitions or (if excluded) linker-errors occur which could not be solved by me. So i switched to following workaround:
Instead of prebuild the library and include it in Build.cs add the thirdparty code to the module and compile it along with the module by UBT.
This can be done by PublicIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "../ThirdParty/XXX/include") //include header files .h }); PrivateIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "../ThirdParty/XXX/src") //include source files .cpp });
this way TRACE_CPUPROFILER_EVENT_SCOPE can be used as in normal UE-Code
if the third PartyLibrary was already optimized during the prebuild. You may have to set OptimizeCode = CodeOptimization.Always; in your modules Build.cs to get the same performance results when using UBT. Otherwise the code, depending on the current Project configuration, is not optimized and results where more than 50% slower as before.