Commit Graph

97 Commits

Author SHA1 Message Date
CarlMagnus Nordin
3d5a2052dc AsyncLoading2: Add support for having multiple PackageStore backends
#preflight 6296fc872a1851b4ccae7e39
#rb pj.kack

[CL 20447121 by CarlMagnus Nordin in ue5-main branch]
2022-06-01 02:12:33 -04:00
Dan Thompson
3a6321167b Packaging Reference Chunk Database - "Lossless Patch Preventer"
Can now provide reference iostore containers to reuse compressed chunks from. If a match is found on *the decompressed data*, instead of recompressing the blocks, they are read off of disk. This allows tweaks of the compressor algorithm without introducing changes as the runtime still sees the exact same data. Additionally this allows for fairly dramatic staging speedups as nvme speeds are significantly faster than high effort compressions. This is distinct from the DDC compression because:
1) DDC compression ties in the compressor version/method
2) We are explicitly interested in chunks that are deployed to end users, not merely cached for speed.

To facilitate this, several changes were made to IoStore:

FIoStoreReader now directly reads from IFileHandles* instead of routing through the GenericPlatformFile async read system, as that system is sensitive to build #defines and can result in constant file opens under load (indeed, for anything not a .pak file, every read is an open/close).

Cold file cache read speed improvements from ~140MB/s to ~1 GB/s. Hot is more.

Additionally:
    FIoStoreReader switched to UE::Tasks from taskgraph for tasks in order to facilitate task retraction during waits as the previous ReadAsync call was trivial to deadlock when called from worker threads due to its use of TFuture<>.
    FIoStoreReader::ReadCompressed now returns the compressed blocks as they were on disk - padded to AES encryption block size.

#rb fabian.giesen
#rb jeff.roberts
#preflight 627586dcf77c9c2b543d4d8b

[CL 20086673 by Dan Thompson in ue5-main branch]
2022-05-06 18:22:44 -04:00
Dan Thompson
718ea8fe80 Several IoStore determinism fixes:
-- Shaders must be sorted prior to inlining, as they are inserted in to a sorted list.
-- Break ties sorting shaders on disk with chunkid (hash)
-- Sort the shader map hashes in the package store entry
-- Pick the lowest LoadOrderFactor instead of the first for shaders that are used in more than one package.
-- Fix -WriteFinalOrder to actually write the final order as well as all chunks.
#rb fabian.giesen, charles.bloom
#preflight 627441a7de15651eeb416fbf

[CL 20065025 by Dan Thompson in ue5-main branch]
2022-05-05 17:43:49 -04:00
CarlMagnus Nordin
63b8cbc9dd AsyncLoading2: Implemented loading of optional package segments
#rnx
#preflight 62627548ac29fcf6a213fe33
#rb francis.hurteau

[CL 19900368 by CarlMagnus Nordin in ue5-main branch]
2022-04-25 07:37:07 -04:00
Johan Torp
ef8e0c4660 Optimize WITH_CASE_PRESERVING_NAME FName loading
LoadDisplayNames() 1.06s -> 0.24s when async loading the name batch in CachedAssetRegistry.bin during editor startup of an internal project

* Introduce FDisplayNameEntryId to avoid cache misses in FName::GetComparisonIdFromDisplayId() lookups
* Force name batch serialization to use display entry ids to help enforce cooking determinism
* Fix determinism problem when loading then saving via FPackageStoreNameMapBuilder
* Inline FNameEntryId::FromUnstableInt()
* Remove slow IsNumbered() check in CreateFromDisplayId when not using 4B FName
* Remove expensive heap sort by sorting up front instead

#rb rob.millar,matt.peters,pj.kack
#preflight 62664bd06968f18d5137d419

[CL 19899104 by Johan Torp in ue5-main branch]
2022-04-25 03:48:33 -04:00
Per Larsson
593ae48c68 IoBuffer - additional constructors from memory view
#rb Paul.Chipchase
#rnx
#jira none
#preflight none

[CL 19465971 by Per Larsson in ue5-main branch]
2022-03-22 09:48:39 -04:00
steve robb
87fb605867 TCHAR array init fixes for UTF-8 mode.
#rb devin.doucette
#preflight 6231e536e2541b4ff3af6cd2

#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19405353 via CL 19408955 via CL 19419621 via CL 19419706
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19420584 by steve robb in ue5-main branch]
2022-03-17 10:29:53 -04:00
Dan Thompson
3af41336cd Adding support for querying the iostore TOC off of a writer instead of just a reader. This is to allow the staging process to find package information and write it back to an asset registry.
#preflight 621d3e7b9a5676d19a3fdd5d
#rb carl-magnus.nordin

[CL 19202453 by Dan Thompson in ue5-main branch]
2022-03-01 13:33:10 -05:00
devin doucette
d40af4e2a4 Changed Blake3Hash/IoHash memory view constructors to static functions
#jira UE-141185
#preflight 61fbfe7a176256ec4f74390c
#lockdown Mark.Lintott
#rb Zousar.Shaker
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18844878 in //UE5/Release-5.0/... via CL 18844902 via CL 18845296
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18845306 by devin doucette in ue5-main branch]
2022-02-03 13:00:24 -05:00
carlmagnus nordin
a201cd8e12 Fixed up uses of FIoDispatcher::IsInitialized() so that they work correctly also when there's a mix of cooked packages in iostore and uncooked packages on disk
FIoDispatcher::IsInitialized() will now return true if it exists (which is almost always)
Renamed FArchive::IsUsingEventDrivenLoader() to IsLoadingFromCookedPackage and based it on the PKG_Cooked flag
#rnx
#rb pj.kack
#preflight 61f3ab6f74510448a6740570

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18769198 in //UE5/Release-5.0/... via CL 18769204 via CL 18769272
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18769277 by carlmagnus nordin in ue5-main branch]
2022-01-28 04:29:58 -05:00
marc audy
0af59ec276 AsyncLoading2:
Add support for importing uncooked source packages from cooked packages
#rnx
#jira UE-136265, FORT-426538
#rb pj.kack
#preflight 61e6ff6a3778a195debba826

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18655480 via CL 18664834 via CL 18665656 via CL 18665916 via CL 18667722 via CL 18667764 via CL 18668174
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v901-18665521)

[CL 18668352 by marc audy in ue5-main branch]
2022-01-19 18:28:42 -05:00
francis hurteau
eb9289d834 Added support to PackageStoreOptimizer to support optional package when generated from legacy cooked header
Support for Zen store will be added separately

#jira UE-129805
#rb CarlMagnus.Nordin, Matt.Peters
#preflight 61e6f8d73778a195debaffa6

#ROBOMERGE-AUTHOR: francis.hurteau
#ROBOMERGE-SOURCE: CL 18642382 in //UE5/Release-5.0/... via CL 18642393 via CL 18642414
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18642448 by francis hurteau in ue5-main branch]
2022-01-18 13:01:31 -05:00
carlmagnus nordin
fdc3ad3cb7 Move IoDispatcherFileBackend from Core to PakFile
#rnx
#preflight 61b89ea22e65a1df0459b68a
#rb pj.kack

#ROBOMERGE-OWNER: carlmagnus.nordin
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18465244 via CL 18465257 via CL 18465387 via CL 18465391 via CL 18465458 via CL 18465466
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18465469 by carlmagnus nordin in ue5-release-engine-test branch]
2021-12-15 03:24:48 -05:00
carlmagnus nordin
195c0d0907 IoDispatcher: Trace counters cleanup pass, fixed double counting of bytes scattered and removed duplicate counters.
#rb pj.kack
#rnx
#preflight 61968cbce86c9c10f4536a42

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18256237 via CL 18256241 via CL 18256243 via CL 18263290 via CL 18263345
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18263518 by carlmagnus nordin in ue5-release-engine-test branch]
2021-11-22 16:44:27 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
robert millar
a43638b937 Modify 'List' command for investigating patch reordering issues.
Add LexToString for EIoChunkType.

#rb carlmagnus.nordin

#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 17680962 in //UE5/Release-5.0/... via CL 17685338
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17685432 by robert millar in ue5-release-engine-test branch]
2021-09-30 19:54:44 -04:00
carlmagnus nordin
51c9794dea PackageStore refactor
* Decouple container concept from IoDispatcher
* Decoiuple PackageStore implementation from AsyncLoading2
* Restore ucas unmount fix that got kist when merrging from UE4
* Fix packages being left in the PackageStiore even after unmounting contaiiners

#rnx
#rb pj.kack, per.larsson
#preflight 61520cc52afc2d0001146ce7

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17641845 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v874-17637634)

[CL 17642353 by carlmagnus nordin in ue5-release-engine-test branch]
2021-09-28 04:00:33 -04:00
devin doucette
7f300d6125 DerivedData: Added a prototype of FDerivedData
Serialization and the FBuildDefinition type of derived data have not been implemented yet. This version is functional in the editor when used with buffers or unstructured cache keys.

#rb Zousar.Shaker
#preflight 614cdb35c2ef060001f6425b

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 17614269 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17614332 by devin doucette in ue5-release-engine-test branch]
2021-09-23 17:31:21 -04:00
carlmagnus nordin
a627591ffa IoStore: Changes to allow IoStore to run as part of UnrealPak instead of as a cmdlet
#rb per.larsson
#rnx

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17517167 via CL 17517189 via CL 17517191 via CL 17519703
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17519714 by carlmagnus nordin in ue5-release-engine-test branch]
2021-09-15 10:39:23 -04:00
robert millar
f12b8f16a3 Set insights trace memory tag on io requests like we do with LLM tag.
#jira none
#rb none
#[robomerge][bot1] Dev-EngineMerge

#ushell-cherrypick of 17464594 by Robert.Millar

#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 17465963 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17465964 by robert millar in ue5-release-engine-test branch]
2021-09-08 19:53:57 -04:00
carlmagnus nordin
2d97f9667e IoStore: Added support for storing compressed chunks in DDC
#rb pj.kack
#rnx

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17444267 via CL 17444348 via CL 17444353 via CL 17444359
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17444366 by carlmagnus nordin in ue5-release-engine-test branch]
2021-09-07 10:11:43 -04:00
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00
devin doucette
5a57d677bf CompactBinary: Added FIoHashBuilder and switched CompactBinary to use it
#rb Zousar.Shaker
#rnx
#preflight 612fb7306256b100011931e9

#ROBOMERGE-SOURCE: CL 17390911 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17390961 by devin doucette in ue5-release-engine-test branch]
2021-09-01 15:05:03 -04:00