AActor ContainsDataLayer Is Slow: Navigation builds are heavily slowed down by TObjectPtr to TSoftObjectPtr conversions when checking if DataLayerAssets contain
Users discovered a huge time loss in navigation build during conversions from TObjectPtr to TSoftObjectPtr. This specific optimization ended up saving our team 1.5hrs on our navigation builds and seems like an easy optimization that would be great for your team to integrate into the engine.
Core Issue:
Optimization:
Overall the process of Converting from TObjectPtr to TSoftObjectPtr is slow due to FString operations & string analysis during the conversion process, and skipping the conversions all together saved our nav build process 1.5 hrs for one of our biggest maps. Also HasDataLayers is pretty slow as well, due to needing to compute the array of DataLayerInstances just to toss it out when doing the Num check. Any improvements to these hot code paths would be greatly appreciated.
Steps to Reproduce
<projectName> -run=WorldPartitionBuilderCommandlet <WorldPartitionMapPath> -Builder=WorldPartitionNavigationDataBuilder -log=WPNavigationBuilderLog.txt -SCCProvider=Perforce -unattended
LikeSelect as Best
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-230596 in the post.