Before Boot -> PIE
FPackageName::DoesPackageExistEx called 191284 times takes 16.45s in total
After Boot -> PIE
FPackageName::DoesPackageExistEx called 191743 times takes 1.61s in total
The majority of the 1.6s (1s) is from calling DoesPackageExistEx before the AssetRegistry has initialized and can provide a fast path. The 180K calls afterwards consume a total of 600ms compared to before, which took 15s.
The original DoesPackageExistEx code checked for package existence on the filesystem, and at the same time found the case matching package name (the casing the file system uses for the package name). This information is known to the AssetRegistry so we can avoid the duplicate work by deferring to the AssetRegistry.
The AssetRegistry needs to initialize itself, and previously did not expose a means to get the Case Matching FNames for Packages which are being used as the keys to AssetPackageData. We add a new overload to IAssetRegistryInterface::TryGetAssetPackageData to allow CoreUObject code to access the another new overload in the AssetRegistry::GetAssetPackageData which returns the case matching FName for the package as an out parameter. Since IAssetRegistryInterface can be used while the AssetRegistry doesn't exist or is still intializing, IAssetRegistryInterface::TryGetAssetPackageData will return UE::AssetRegistry::EExists::Unknown when the asset registry is not yet available. In the Unknown case, we fallback to the original FPackageName::DoesPackageExistEx codepath which reads from disk.
I've made the (Try)GetAssetPackageData methods that only return FAssetPackageData* to use the new implementation that returns a FAssetPackageData* and populates an FName in order to reduce code duplication, however I'm open to changing this if the extra store is a concern. All paths perform the key search in the AssetRegistry's CachedAssetPackageData map.
#jira UE-204062
#rb Matt.Peters
[CL 31055136 by kevin macaulayvacher in ue5-main branch]
*) Handle nullptr when serializing ITargetPlatform; some systems need to track editor-agnostic data and serializing that is a nullptr ITargetPlatform* is convenient.
*) Remove includes when the code using them is ifdef'd out.
*) Remove ReportAccessedIniSettings hooks. The information will instead be part of the information reported from CookWorker -> Zen for package-specific accesses, and will be replicated using an IMPCollector for the total list of all accesses throughout the cook.
*) Add BroadcastCookByTheBookFinished subfunction to record the declaration of IMPCollectors constructed privately by UCookOnTheFlyServer in the same place as external systems declare their IMPCollectors.
#jira UE-133736
#rnx
#rb Zousar.Shaker
[CL 31049094 by matt peters in ue5-main branch]
A new VTask object tracks a chain of the VFrames, from the point where the task was spawned to the point where it suspended. This task boundary is recorded by a pair of BeginTask/EndTask instructions. Individual <suspends> function calls in the new VM do not have distinct tasks, and <suspends> does not change how bytecode is generated.
Native functions may suspend the current task by returning a new FOpResult of kind Yield, at which point the current PC is saved to the VTask, its VFrames are detached from the stack, and execution continues in the parent task. Native code may resume a task with a new VTask::ResumeInTransaction API, which re-attaches these VFrames to the top of the stack and continues execution from the saved PC.
VNI functions continue to use the verse::continuation API, which now wraps a VTask pointer and thus must be accounted for during GC tracing.
#rb Markus.Breyer, saam.barati
#okforversepublic
[CL 30978163 by russell johnston in ue5-main branch]
- Changed codepaths reading FProperty objects using ReadObject() to now use ReadPropertyUnchecked(), since FProperty is not a child of UObject (ReadObject was also an unchecked implementation so validation has been lost).
These changes allow ReadObject to return a UObject fetched from a constructed TObjectPtr<UObject> which enables UObject access tracking. This corrects the previous implementation of ReadProperty which would return an FProperty from a temporarily constructed TObjectPtr<UObject>. This had the effect of running TObjectPtr tracking handlers (if any are registered) on the FProperty object which is not actually a UObject type. Using the intermediate TObjectPtr<UObject> in a handler could corrupt the underlying FProperty data as many codepaths in TObjectPtr lazily initialize UObject member variables upon calling UObject methods.
#jira UE-204533
#rb Francis.Hurteau, Robert.Manuszewski
[CL 30924162 by kevin macaulayvacher in ue5-main branch]
[FYI] kevin.macaulayvacher
Original CL Desc
-----------------------------------------------------------------
Re-enable check for invalid PackageHandles when resolving Packaged Objects. This check helps with identifying cases where garbage memory is used to construct objects
#rb Francis.Hurteau
[CL 30885059 by kevin macaulayvacher in ue5-main branch]
Add comments warning against use of IsDefaultSubobject due to the historically inconsistent behavior, and deprecate CollectDefaultSubobjects for being redundant and incorrect
Improve general comments related to subobject functions to better match the current behavior
#jira UE-201046
#rb dan.oconnor
[CL 30858830 by ben zeigler in ue5-main branch]
Added GarbageCollectComplete event that gets fired after GC is truly done (existing events were inconsitent in that manner)
#rb Johan.Torp
[CL 30845256 by robert manuszewski in ue5-main branch]
[BugFix] mark properties as overridden when changed by fixup tool
[Temp] gave IDO properties without categories a category as a workaround to a details customization bug
#rb Francis.Hurteau
[CL 30826433 by jordan hoffmann in ue5-main branch]
Duplicate values are filtered out during load.
Existing config values for set properties should continue to be loaded the same way as before.
Example syntax:
SetProperty=("Value1", "Value2")
+SetProperty="Value3"
+SetProperty=("Value4", "Value5")
[REVIEW]
[CL 30815266 by spencer melnick in ue5-main branch]