Commit Graph

86 Commits

Author SHA1 Message Date
kevin macaulayvacher
a66f947914 Improves DoesPackageExistEx by enabling it to use the AssetRegistry when it's available
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]
2024-01-31 13:06:38 -05:00
devin doucette
efa61fcca3 Added structured serialization of FPropertyTypeName
#rb Francis.Hurteau
#rnx

[CL 31050185 by devin doucette in ue5-main branch]
2024-01-31 11:21:12 -05:00
devin doucette
308d762eb7 Updated FPropertyTypeName to make it more convenient to use
#rb Francis.Hurteau
#rnx

[CL 30862617 by devin doucette in ue5-main branch]
2024-01-24 16:37:36 -05:00
devin doucette
f0b3f1f627 Updated FPropertyPathName to use FPropertyTypeName
#jira UE-197352
#rb Francis.Hurteau
#rnx

[CL 30646449 by devin doucette in ue5-main branch]
2024-01-16 16:49:05 -05:00
devin doucette
b109dd23ad Added FPropertyTypeName to represent the full type name of a property
#jira UE-197352
#rb Francis.Hurteau
#rnx

[CL 30592565 by devin doucette in ue5-main branch]
2024-01-12 09:56:20 -05:00
robert manuszewski
a210b585b6 EInternalObjectFlags cleanup: removed PendingKill and deprecated composite flags
#rb Johan.Torp, Steve.Robb

[CL 30109006 by robert manuszewski in ue5-main branch]
2023-12-05 01:37:45 -05:00
joe pribele
13c832949e fix for failing unit test when late resolved off
#jira UE-200701
#rb zousar.shaker
https://p4-swarm.epicgames.net/reviews/29812692

[CL 29813931 by joe pribele in ue5-main branch]
2023-11-17 13:23:15 -05:00
joe pribele
8a90540da2 removed some printf debugging
[CL 29812769 by joe pribele in ue5-main branch]
2023-11-17 12:50:55 -05:00
joe pribele
1e6438eb61 combining FObjectPropertyPtr and FObjectProperty and FClassPropertyPtr and FClassProperty together
simplifies usage of Object Properties and fixes a few edge cases

see zousar.shaker for issues

#rb zousar.shaker

[CL 29761675 by joe pribele in ue5-main branch]
2023-11-15 17:27:09 -05:00
zousar shaker
a181f60498 Reduce overhead in object handle access tracking by reducing high frequency thrash of TArrayView. Synthetic test of 100 million handle accesses in a loop went from 4243ms total time to 1430ms total time.
Further improvements to be had by avoiding CheckCallable overhead of TFunction and making a lockless container to store read callbacks.  Those will be investigated in future changelists.

#rb joe.pribele
[FYI] dan.oconnor
[FYI] ben.zeigler

[CL 27728373 by zousar shaker in ue5-main branch]
2023-09-08 17:04:23 -04:00
francis hurteau
bd3a51f5a8 Truncation warning fixes for CoreUObject
#jira UE-166274, UE-127233
#rb Devin.Doucette, Paul.Chipchase

[CL 26553935 by francis hurteau in ue5-main branch]
2023-07-24 16:13:27 -04:00
Matt Peters
f8d5c01789 ObjectPropertyTest fixes:
1) Fix for test package names not starting with proper prefix
2) Fix incompatible value that is passed into CheckValidObject to NOT be the outer of the fallback objecte. The incompatible value now gets renamed by CheckValidObject, and renaming the outer of the fallback object would break the test.
#rnx
#rb Joe.Pribele

[CL 26474125 by Matt Peters in ue5-main branch]
2023-07-19 18:36:21 -04:00
matt peters
3c2682f374 FArchiveStackTrace: Deprecate the public interface and move it into a private helper class of DiffPackageWriter.
#rb Zousar.Shaker
#rnx

[CL 26269033 by matt peters in ue5-main branch]
2023-06-27 16:13:59 -04:00
robert manuszewski
b5e73242e3 Experimental support for Incremental Reachability Analysis (second attempt)
Disabled by default. gc.AllowIncrementalReachability controls if it's enabled or not.
gc.IncrementalReachabilityTimeLimit controls time limit (defaults to 0.005 = 5ms)
gc.VerifyNoUnrachableObjects (defaults to 0) controls additional GC assumption verification that no unreachable objects are reachable after RA is complete
gc.ContinuousIncrementalGC (defaults to 0) is a new GC stress test that runs incremental GC continuously
TObjectPtr barrier (Obj->MarkAsReachable()) is also currently disabled (compiled out with a macro) until we have all the places (ARO/BPVM) properly running barriers
EngineTest tests can and will run Incremental Reachability Analysis tests even if all the above is disabled

#rb Johan.Torp, Zousar.Shaker

[CL 26252569 by robert manuszewski in ue5-main branch]
2023-06-27 01:44:30 -04:00
robert manuszewski
d5c2c7bc97 Undo changelist 26229717
#rb none

[CL 26237963 by robert manuszewski in ue5-main branch]
2023-06-26 13:26:02 -04:00
robert manuszewski
5800b6b608 Experimental support for Incremental Reachability Analysis
Disabled by default. gc.AllowIncrementalReachability controls if it's enabled or not.
gc.IncrementalReachabilityTimeLimit controls time limit (defaults to 0.005 = 5ms)
gc.VerifyUnrachableObjects (defaults to 0) controls additional GC assumption verification that no unreachable objects are reachable after RA is complete
gc.ContinuousIncrementalGC (defaults to 0) is a new GC stress test that runs incremental GC continuously
TObjectPtr barrier (Obj->MarkAsReachable()) is also currently disabled (compiled out with a macro) until we have all the places (ARO/BPVM) properly running barriers
EngineTest tests can and will run Incremental Reachability Analysis tests even if all the above is disabled

#rb Johan.Torp, Zousar.Shaker

[CL 26229728 by robert manuszewski in ue5-main branch]
2023-06-26 04:38:56 -04:00
joe pribele
b90e7cc30e fix for warning in PluginManager test
[CL 26219331 by joe pribele in ue5-main branch]
2023-06-23 17:12:06 -04:00
joe pribele
0a1ccfbbc1 redoing 25858318
moved leak detection and Garbage collection to Plugin Manager
Before unmounting the plugin path, GC is ran, leaked detection for any references objects under the plugin path

#rb Justin.Marcus, Markus.Breyer
https://p4-swarm.epicgames.net/reviews/25611054

[CL 26214355 by joe pribele in ue5-main branch]
2023-06-23 14:22:58 -04:00
joe pribele
d2b78c257c Undo //Fortnite/Main/... changelist 25858318
[CL 25862359 by joe pribele in ue5-main branch]
2023-06-07 19:42:46 -04:00
joe pribele
8543547111 moved leak detection and Garbage collection to Plugin Manager
Before unmounting the plugin path, GC is ran, leaked detection for any references objects under the plugin path

#rb Justin.Marcus, Markus.Breyer
https://p4-swarm.epicgames.net/reviews/25611054

[CL 25858446 by joe pribele in ue5-main branch]
2023-06-07 17:09:53 -04:00
joe pribele
f2b80ba74b added GetOuter and GetPackage to FObectPtr and TObjectPtr
changed how the Object Handle index stores info to be able to get the class of the outer objects
Packages dont' store a ObjectPathId or ClassDescriptor as it is always known

https://p4-swarm.epicgames.net/reviews/25378953
#rb zousar.shaker
#preflight 64791957e25209b6cbbb45fc

[CL 25747367 by joe pribele in ue5-main branch]
2023-06-01 18:45:09 -04:00
joe pribele
6c77f6cdc5 fix for not setting up properties correctly.
this matches the uht generated code more closesly
https://p4-swarm.epicgames.net/reviews/25707323

#rb matt.peters
#preflight 64791483e25209b6cbb931ac

[CL 25746642 by joe pribele in ue5-main branch]
2023-06-01 18:22:59 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
joe pribele
627db198b3 change to FObjectPtrProperty::Identical to avoid loading lazy loaded objects
https://p4-swarm.epicgames.net/reviews/25288349
#rb zousar.shaker
#preflight 64598eb5023fe5d3ad6df74d

[CL 25381637 by joe pribele in ue5-main branch]
2023-05-08 20:13:30 -04:00
kirill zorin
a58d329c4d Update TObjectPtr unit tests to assert against specific pointers (instead of all pointers) due to upcoming ARO changes.
#rb joe.pribele
#preflight 644ae1066638b912841d8bc1

[CL 25223794 by kirill zorin in ue5-main branch]
2023-04-27 17:20:13 -04:00