Create a new interface IPackageResourceManager that handles all attempts to load packages from storage. The default implementation passes through to loading from IFileManager. Future implementations will load from other services such as the EditorDomain and TargetDomain.
Add FPackagePath class that holds a LocalFilePath or LongPackageName, or a relative path to a package under a mounted content root (which can be converted into either the LocalFilePath or LongPackageName).
Modify LinkerLoad, BulkData, and AsyncLoader to use FPackagePath and IResourceManager.
Modify UPackage and FLinkerLoad to have a FPackagePath instead of a Filename.
#rb Paul.Chipchase, CarlMagnus.Nordin, Francis.Hurteau, Devin.Doucette
#rn Major Core
[CL 14814912 by Matt Peters in ue5-main branch]
- This stops code compiling fine in the editor then breaking when compiled for a different config.
#rb Martin.Ridgers
#fyi ben.ingram
#rnx
[CL 14812609 by paul chipchase in ue5-main branch]
Changed Save2 to use the old import sorting algo to keep binary consistent between the new and old save algo
Encapsulated "UseUnversionedPropertySerialization" in LinkerSave to set both the archive mode and the necessary package flag
Moved FObjectImportSortHelper to SavePackageUtilities
Cache "s.ProcessPrestreamingRequests" for Save2
#rb Matt.Peters
[CL 14790090 by Francis Hurteau in ue5-main branch]
On Mac the Main thread isn't the Game thread, so this trips the assert in ~FInternalReferenceCollector(), even if the TStrongObjectPtr has been manually Reset prior.
#jira UE-101794
#fyi Alexis.Matte
#rb Steve.Robb
[CL 14787366 by Jamie Dale in ue5-main branch]
This isn't related to any particular bug, but while debugging I found myself confirming that this was not the case - especially since INDEX_NONE may appear to be a valid value for ArrayIndex.
#rb paul.chipchase
[CL 14774958 by sebastian nordgren in ue5-main branch]
- Add protection against async property accessed during async build and postload.
- Split PostLoad into 3 steps with the most part now being made async.
- Make Build/BatchBuild API async when the feature is activated.
- Add a new StaticMesh compilation manager. (This will be refactory later to reduce duplicated code with texture compiler).
- Skip RenderState creation for any static mesh component still being built so they only show up when ready.
- Fixed DistanceField and MeshCard computation that might trigger too soon if fixups are required to RenderData during PostLoad.
- Dynamic priorisation for building and updating static meshes nearest to the viewport.
- Implement different PIE modes, current default is to stall only for mesh that might affect nagivation/collision for players/bots.
- Add a new generic interface for assets being built (still a WIP).
- Add ability in FrontEnd filters to skip serialization of asset being async compiled and refresh when compilation finishes.
- Prevent auto-save while textures and static meshes are being built (same as shaders)
- Logic has been reordered in some Fortnite Building Component to avoid unnecessarily touching static mesh properties.
General Optimizations
- Use cached thumbnails until shaders/textures/static meshes are ready to improve performance and avoid rendering incomplete thumbnails.
DEBUGGING
- Can be forcibly enabled/disabled through command-line via -asyncstaticmeshcompilation=[off, on, paused]
- Can pause staticmesh compilation using Editor.AsyncStaticMeshCompilation = 2 or -asyncstaticmeshcompilation=paused
- Can manually resume a specified amount of paused compilation using Editor.AsyncStaticMeshCompilationResume [Num]
- Can forcibly wait on all compilation using Editor.AsyncStaticMeshCompilationFlushAll
BENCHMARKS
- 2m19s to 17.9s for Loading FortGPUTestbed's LumenTest with an empty local only DDC
- 2h45m to 5mxxs for Loading Reverb's P_World with an empty local only DDC
- 17m29 to 10m27s for Loading Apollo_Terrain_Edit with an empty local only DDC
TESTS
- Loading maps from Reverb, Fortnite, ShooterGame, QAGame, FortGPUTestbed
- Content browser interactions while still under heavy compilation
- Importing with Datasmith / Dataprep
- Working with the new Mesh Modeling Tool
- Shutting down the editor while loading
- Most of EngineTest Test Suite
REFERENCES
- Design https://docs.google.com/document/d/1O4GI1G9AtQN6l0SaGFfXw0DyNhlLunLoEqne5INvxIQ
- Documentation https://docs.google.com/document/d/1KCdFEMhhcsGwfgOisTVwlOwtsmEd7qbB0V6Tc39Gb10
#rb Francis.Hurteau
[CL 14688146 by danny couture in ue5-main branch]
MakeView now has overloads that accept an outer shared buffer that it will hold a reference to and inherit the read-only state from. The view must be contained by the outer shared buffer.
TakeOwnership now has overloads that accept an instance of a type derived from FSharedBuffer::FBufferOwner that will be moved and stored to manage the lifetime of the buffer when a delete function is insufficient.
Functions that create buffers now return pointers instead of references, for more optimal reference counting. ToSharedRef can be called on the return value to convert it to a reference in cases where that is useful.
#jira none
#rb Zousar.Shaker
#rnx
[CL 14680479 by Devin Doucette in ue5-main branch]
Also add protection so meshdescription can be read from multiple threads in editor
- Loading Reverb's P_World with empty DDC
- 319GB to 242GB peak private byte
- 166GB to 80GB permanent memory usage after map load
#rb Richard.Talbot-Watkins, Matt.Peters, Paul.Chipchase
[CL 14544739 by danny couture in ue5-main branch]
This fixes a regression in behavior where structs may receive partial updates due to NAKs.
#jira UE-101061
#review-14481580 @Brian.Bekich
#rb Brian.Bekich
[CL 14486636 by Jon Nabozny in ue5-main branch]
The new function is equivalent for all cases except the cases below (which were already deprecated):
Case) An InOuter was provided with no InLongPackageName, and the InOuter had no existing linker, and the InOuter is a Memory-only package, and a file exists on disk with the same path.
Change) The previous version would have called CreateLinker with the filename from disk; the new version will silently skip the CreateLinker call and return nullptr.
Case) Load_AllowDll package flag was set, and an InOuter was provided with no InLongPackageName, and the InOuter had no existing linker, and the file did not exist on disk.
Change) The previous version would have silently returned nullptr; the new version will issue a warning and return nullptr.
Case) Load_NoWarn or Load_Quiet was provided, and an InOuter was provided with no InLongPackageName, and the InOuter had no existing linker, and the file did not exist on disk.
Change) The previous version would have issued a warning and returned nullptr; the new version will silently return nullptr.
Case) An InOuter was provided, and an InLongPackageName was provided, and the InOuter had no existing linker, and no package existed for the (possibly redirected) InLongPackageName.
Change) The previous version would have created an unused package with name InLongPackageName, and then called CreateLinker on the InOuter; the new version will not create the unused package.
Case) An InOutLoadContext is provided that is not equal to FUObjectThreadContext::Get().GetSerializeContext() and we reach the call to CreateLinker.
Change) The previous version would have passed FUObjectThreadContext::Get().GetSerializeContext() to CreateLinker; the new version will pass InOutLoadContext.
Note) This case does not currently exist in any callsite in the Engine; they all pass nullptr or FUObjectThreadContext::Get().GetSerializeContext() for the InOutLoadContext.
Case) An InOuter was not provided, and a CompatabilityGuid was provided, and a package and linker already exists in memory for the given name, and the guid on disk for the packagename matches the CompatabilityGuid, but the guid from the linker in memory does not.
Change) The previous version would have returned nullptr; the new version will ignore the mismatch and return the linker in memory.
#rb Francis.Hurteau, Robert.Manuszewski
#rnx
[CL 14480063 by Matt Peters in ue5-main branch]
Fix subobject overriding in the case of a required subobject that has been both overriden for class and marked do not create. Previously it was ending up with the default subobject type rather than the valid overriden value.
Create an EngineTest that validates all expectations for subobjects and nested subobject overrides
#rb Dan.OConnor
[CL 14425910 by Marc Audy in ue5-main branch]