Commit Graph

359 Commits

Author SHA1 Message Date
matt peters
2971248963 IncrementalCook: Add support for iterative and incremental cooks of CookPackageSplitters.
#rnx
#rb Zousar.Shaker

[CL 33710894 by matt peters in ue5-main branch]
2024-05-16 23:22:12 -04:00
zousar shaker
655bc51a38 Add SSL certificates to the zen manifest if the configuration would mean they're part of the staged build.
#jira UE-215216
#rb daniele.pieroni

[CL 33704487 by zousar shaker in ue5-main branch]
2024-05-16 18:58:30 -04:00
pj kack
bff7ef0500 UnrealPak: Change memory throttling logic to prepare for async DDC get requests that can allocate compression buffers from worker threads.
Add IIoStoreWriteRequest::GetSourceBufferSizeEstimate() to get an upfront approximation of required memory for source reads and compression buffers.
Limit memory usage upfront in FIoStoreWriterContextImpl::ScheduleEntry() based on the estimate instead of during the actual allocations in the middle of the pipeline.
Remove wait from AllocCompressionBuffer and always let it return immediately with a valid compression buffer.
Rename FIoStoreWriteQueueEntry::NumChunkBlocksFromRefDb to NumChunkBlocks and use it for all entries.
Replace the unnecessary FIoStoreWriteQueueEntry::WriteFinishedEvent with a single WriterThread.Wait().
In FIoStoreWriterContextImpl::WriteEntry() reduce som memory growth by releasing the ChunkBlocks array and moving the filename when building the toc directory index.
Bump compression memory limit from 2 GB to 3 GB to reduce the need to (mostly) drain the queue to schedule large-ish entries.

#rb Per.Larsson
#rnx
#tests identical binary diff of /content/paks folder

[CL 33622054 by pj kack in ue5-main branch]
2024-05-14 01:45:53 -04:00
pj kack
9d1aa521f4 UnrealPak: Add UsedPhysical and UsedVirtual memory stats to progress output logging and always log at least one status line.
#rb Per.Larsson
#rnx

[CL 33598566 by pj kack in ue5-main branch]
2024-05-13 04:12:59 -04:00
matt peters
66f0b9950e Cooker:
Bugfix for incremental ZenStoreWriter: it was broadcasting iterativelyunmodified for every package whether it was modified or not.
MPCook Performance bugfix for GenerationHelper on cookdirector: it was initializing them (and loading the generator package) when it did not need to in response to discovery and savepackage messages from cookworkers.
Fix some coding standard issues.
Readability improvements for some save code that is about to be extended.
#rnx
#rb Zousar.Shaker

[CL 33554042 by matt peters in ue5-main branch]
2024-05-09 14:40:00 -04:00
pj kack
b712a661a8 UnrealPak: Revert ParsePakResponseFile and ParsePakOrderFile optimizations in 33258481 to fix parsing errors for file paths with spaces in them.
#jira UE-213449
#rb per.larsson
#rnx
#tests binary diff of content/paks folder

[CL 33333577 by pj kack in ue5-main branch]
2024-04-30 08:06:34 -04:00
steve robb
92463911c8 Fixed mismatched printf format arguments.
#rb brandon.schaefer

[CL 33264801 by steve robb in ue5-main branch]
2024-04-26 11:02:47 -04:00
pj kack
eb7f45d950 UnrealPak: Minor cpu optimizations (by reducing allocations).
Reserve memory upfront for some big containers and pass EAllowShrinking::No when popping/removing items.
Optimize parsing of huge text files in ParsePakResponseFile and ParsePakOrderFile by using more efficient utility functions:
FFileHelper::LoadFileToStringArray -> FFileHelper::LoadFileToStringWithLineVisitor
FParse::Token -> UE::String::ParseTokens

#rb Per.Larsson
#rnx
#tests binary diff of content/paks folder

[CL 33258490 by pj kack in ue5-main branch]
2024-04-26 04:18:45 -04:00
daebo01
e7981e5e52 GitHub 11732 : Fix bug where ContainerFlags may not be copied when creating an IoContainer
#11732
#jira UE-211845
#rb PJ.Kack

[CL 33257739 by daebo01 in ue5-main branch]
2024-04-26 02:33:45 -04:00
pj kack
e8f8605db5 UnrealPak: Reduce scheduler threads and their lifetime (mostly for improved visualization, analysis and understanding).
Remove superfluous FinishEncryptionAndSigningThread and set the FIoStoreWriteQueueEntry::CompressedSize in EncryptAndSign() instead.
Construct and initialize WriteRequestManager and start its threads when it is first used after ProcessShaderLibraries.
Start FIoStoreWriterContextImpl scheduler threads from Flush() instead of from Initialize().
Stop FIoStoreWriterContextImpl scheduler threads once they have drained their queue.
Add trace counters to analyze the overall progress of the different type of tasks.

#rb Per.Larsson
#rnx
#tests Binary diff of Content/Paks

[CL 33135911 by pj kack in ue5-main branch]
2024-04-22 07:50:48 -04:00
pj kack
a895984492 UnrealPak: Hash logic cleanup.
Deprecate the 32 byte FIoChunkHash (filled with 12 zero bytes) and replace it with the 20 byte FIoHash.
Remove IIoStoreWriterHashDatabase and merge AssetRegistry hashes and Zen ChunkInfo hashes into FCookedPackageStore.
Use Zen chunkinfo hashes for package and bulk data when paking from a Zen cook (package buffers are immutable).
Use AssetRegistry hashes for bulk data when paking from a loose file cook (package buffers are transformed).
Add IIoStoreWriteRequest::GetChunkHash to access the chunk hash from the cook.
Rename the argument -verifyhashdatabase to -validatechunkhashes.

Minor:
Calculate CompressionMethodForEntry once for each FIoStoreWriteQueueEntry.
Add trace cpu scopes for scheduler threads.
In FCookedPackageStore remove unused functions and optimize oplog parsing and GetChunkInfoFromFileName.

Tests:
Paking with -validatechunkhashes from a loose file cook with/without RefDB.
Paking with -validatechunkhashes from a Zen cook with/without RefDB.
Running UnrealPak "<ucas> -extract", "-list=<ucas>" and "iostore -list=<ucas>" commands on old containers serialized with FIoChunkHash in FIoStoreTocResource::ChunkMetas.

#jira UE-185354,UE-202679
#rb Per.Larsson

[CL 33032419 by pj kack in ue5-main branch]
2024-04-17 07:02:04 -04:00
zousar shaker
106b9499e0 Convert ue.projectstore file to json.
#rb dan.engelbrecht

[CL 32464544 by zousar shaker in ue5-main branch]
2024-03-24 22:03:42 -04:00
dan thompson
32ef1ba307 Updating RCD logging to segregate optional containers.
[CL 32286270 by dan thompson in ue5-main branch]
2024-03-15 18:35:50 -04:00
pj kack
4161e66f68 Move all IoStoreWriter code (writing of .utoc/.ucas containers) out from Core into IoStoreUtilities.
Break cyclic dependency on DerivedDataCache module to utilize DDC2 API to cache compressed chunks.
The declarations moved from the public header are considered private and are not really usable outside of the IoStoreUtilities/UnrealPak context.

#rb per.larsson
#rnx
#tests BuildCookRun Lyra with pak/container files

[CL 31986007 by pj kack in ue5-main branch]
2024-03-04 07:47:44 -05:00
dan thompson
897cd0a5f4 Prevent partial initialization of the reference chunk database on failures.
#rb fabian.giesen

[CL 31820385 by dan thompson in ue5-main branch]
2024-02-26 18:02:39 -05:00
dan thompson
7c183a3178 Removing AssetRegistryWritebackAfterStage. This has evolved such that it needs to be run during stage and is not really useful afterwards. Was deprecated in 5.4 after being release in I think 5.3, highly unlikely anyone was using it.
#jira UE-195225
#rb charles.bloom

[CL 31817274 by dan thompson in ue5-main branch]
2024-02-26 16:35:32 -05:00
dan thompson
033ec352b1 Since package names are usually FNames, added a helper to avoid any extraneous allocations when grabbing the root.
#jira UE-195217
#rb Matt.Peters

[CL 31690907 by dan thompson in ue5-main branch]
2024-02-21 13:50:00 -05:00
martin ridgers
dea833b91e Removed IAS upload from UnrealPak. It is now exposed via the IasTool program.
#rb per.larsson
#rnx

[CL 31676621 by martin ridgers in ue5-main branch]
2024-02-21 03:39:50 -05:00
dan thompson
15fd28a21e Reference Chunk Database:
* Optionally output a CSV of changed/new packages.
* Add an additional directory input if containers get separated off during a build process
* Catch optional segment containers and patch up the container id per the id fix in a separate CL.
bunch of different preflights due to CIS issues.
#rb fabian.giesen
#jira UE-172130

[CL 31576665 by dan thompson in ue5-main branch]
2024-02-16 15:10:30 -05:00
dan thompson
ef9ccefa8f Updating optional segment iostore containers to have a unique container id instead of reusing their base container's id. This time to verify I removed the FIoContainerId struct _entirely_ from the codebase to make sure I caught all use cases, and kicked the relevant build that failed.
#rb Per.Larsson

[CL 31541486 by dan thompson in ue5-main branch]
2024-02-15 18:04:47 -05:00
thanasis vogiannou
a95164a9b5 UnrealPak: Replace check with warning for missing import Script Object in IoStore describe
#rb Per.Larsson, PJ.Kack

[CL 31516929 by thanasis vogiannou in ue5-main branch]
2024-02-15 08:15:56 -05:00
graeme thornton
8e2da03811 [Backout] - CL31362445
[FYI] dan.thompson
Original CL Desc
-----------------------------------------------------------------
Updating optional segment iostore containers to have a unique container id instead of reusing their base container's id. The container ID is only used to load the container's header chunk and otherwise is only used for informative purposes (and the ref cache db.._ and so this will not affect the ability to load optional segment containers in a cooked editor.
#rb Francis.Hurteau

[CL 31379180 by graeme thornton in ue5-main branch]
2024-02-12 08:12:49 -05:00
dan thompson
3dccd63435 Updating optional segment iostore containers to have a unique container id instead of reusing their base container's id. The container ID is only used to load the container's header chunk and otherwise is only used for informative purposes (and the ref cache db.._ and so this will not affect the ability to load optional segment containers in a cooked editor.
#rb Francis.Hurteau

[CL 31368093 by dan thompson in ue5-main branch]
2024-02-10 12:47:35 -05:00
martin ridgers
edf615ef53 Lifted IAS' TOC downloading out from UnrealPak
#rb paul.chipchase
#rnx

[CL 31167977 by martin ridgers in ue5-main branch]
2024-02-05 04:51:45 -05:00
pj kack
9e9bb35f97 ZenFileSystemManifest fixes for missing plugins on target platforms (relax optimizations in 25794520).
When adding plugin directories also add any valid plugin extension directories (inspired by cl 24072232).
Don't filter out plugins disabled in the editor/cooker, they may still be enabled on the target platform.

todo: Reintroduce more accurate plugin filtering logic.
#rb dan.engelbrecht, Zousar.Shaker

[CL 31167561 by pj kack in ue5-main branch]
2024-02-05 04:07:35 -05:00