Also hide the browse button on SoftObjectPtr properties when in a partitioned world, as it used to load the corresponding sublevel. This could be replaced with a "load referenced actor" button in the future.
#rb richard.malo
#robomerge[STARSHIP] Release-5.0-EarlyAccess
[CL 15675812 by JeanFrancois Dube in ue5-main branch]
Ensured loads that need to happen from a reference resolve off the game thread get shunted to the game thread.
Code changes to avoid easily-avoidable object reference resolves that would otherwise reduce benefits of lazy load.
Further work pending to avoid object resolution during serialization phases at cook time and define cook-specific lazy load configuration.
Tested:
ShooterGame editor, cook, PIE
#rb devin.doucette
[CL 15647559 by Zousar Shaker in ue5-main branch]
#rb francis.hurteau
[FYI] jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 15587924 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)
[CL 15587932 by richard malo in ue5-main branch]
-Compile in lazy resolve functionality for editor binaries
-Add "-LazyResolveAllImports" commandline switch to allow lazy RESOLVE of all wrapped object references
-Functionality confirmed: load default map in ShooterGame Editor, cook ShooterGame, load LumenReflectiveTest in FortGPUTestbed, load default map and P_Construct in Frosty
-Renamed "-DisableLoadingAllImports" to "-LazyLoadAllImports" commandline switch to allow lazy LOAD of all wrapped object references and ensured it works with AsyncLoading code path
-Non functional when combined with lazy resolve - will be worked on afterwards
-Added CPU timing scopes to measure performance impact of lazy resolve
Fixed lazy resolve bugs:
-Ensure null check on an unresolved object reference resolves the object reference (a non-null unresolved reference can become a null resolved reference)
-Ensure hash of an unresolved object reference resolves the object reference and hashes the resultant address (otherwise we can't reliably ensure hash consistency in the face of object redirection or stale references)
-Avoid using package name hash internally as it immediately manifested in hash collisions on a moderately sized project
-Ensure StaticFindObjectFastInternal instead of StaticFindObjectFast to ensure we can find/resolve not fully loaded objects
-Ensure UObjectRedirectors are handled when resolving wrapped object pointers
-Ensure we handle the possibility that a package has been partially loaded and we may not find our target object within it because the object hasn't been created yet
Automated testing:
-Adding hash consistency and redirector resolve tests to ObjectPtr unit tests
#rb devin.doucette
[CL 15571874 by Zousar Shaker in ue5-main branch]
- Use ParallelFor for reference collection so the game-thread can make progress without the help of worker threads
- This fixes a potential deadlock between worker threads using FGCScopeGuard and the game-thread trying to complete a GC
- Add starvation unittest to detect if the garbage collector implementation is starvation free
- Also protects against ABA problems that might occur when using TLockFreePointerListUnordered and going too wide
NOTES
- The fix is only active in Editor to avoid introducing regression where big/little cores are important
- Heavy use of FGCScopeGuard is currently not expected for non-editor workflows, this might get revisited later
TESTS
- Confirm that FGarbageCollectorStarvationTest fails without the ParallelFor
- Confirm that FGarbageCollectorStarvationTest succeeds when using the ParallelFor
#rb Francis.Hurteau, Robert.Manuszewski
[CL 15568134 by danny couture in ue5-main branch]
Static analyzer always evaluates expressions in check(), despite DO_CHECK=0 due to implementation of check():
#define check(expr) { CA_ASSUME(expr); }
If checked expression depends on something that's wrapped in `#if DO_CHECK`, it will produce a compile error. The fix is to add USING_CODE_ANALYSIS condition where applicable.
#robomerge Release-5.0-EarlyAccess
#rb Steve.Robb
[CL 15527660 by Yuriy ODonnell in ue5-main branch]
-Add "-LazyResolveAllImports" commandline switch to allow lazy RESOLVE of all wrapped object references
-Functionality confirmed: load default map in ShooterGame Editor, cook ShooterGame, load LumenReflectiveTest in FortGPUTestbed, load default map and P_Construct in Frosty
-Renamed "-DisableLoadingAllImports" to "-LazyLoadAllImports" commandline switch to allow lazy LOAD of all wrapped object references and ensured it works with AsyncLoading code path
-Non functional when combined with lazy resolve - will be worked on afterwards
-Added CPU timing scopes to measure performance impact of lazy resolve
Fixed lazy resolve bugs:
-Ensure null check on an unresolved object reference resolves the object reference (a non-null unresolved reference can become a null resolved reference)
-Ensure hash of an unresolved object reference resolves the object reference and hashes the resultant address (otherwise we can't reliably ensure hash consistency in the face of object redirection or stale references)
-Avoid using package name hash internally as it immediately manifested in hash collisions on a moderately sized project
-Ensure StaticFindObjectFastInternal instead of StaticFindObjectFast to ensure we can find/resolve not fully loaded objects
-Ensure UObjectRedirectors are handled when resolving wrapped object pointers
-Ensure we handle the possibility that a package has been partially loaded and we may not find our target object within it because the object hasn't been created yet
Automated testing:
-Adding hash consistency and redirector resolve tests to ObjectPtr unit tests
#rb devin.doucette
[CL 15514386 by Zousar Shaker in ue5-main branch]
FindPackagesRecursive needs to handle IPlatformFilePak returning relative paths.
FPackageName::SearchForPackageOnDisk (and therefore the simpler version of FindPackagesRecursive that it uses) needs to consider only headersegment packages.
#rb PJ.Kack
#rnx
[CL 15488968 by Matt Peters in ue5-main branch]
Do not allow new transaction to be created while in the midst of loading packages or post loading objects
Temporarily shelve an opened transaction while ticking async loading in the main thread and consider this scope as "loading packages"
#rb Jamie.Dale
[CL 15397637 by Francis Hurteau in ue5-main branch]