Loading Showcase map taking a long time?

I’m on the “Warehouse Wreckage - Importing Assets” section of the UE5 course and am attempting to open the Showcase map from the downloaded IndustryPropsPack6 that was used for this lesson and it took a very long time to load. About 25-30 minutes before it finally opened up. I had a similar issue when I first launched UE5 where it took a couple of hours to load all of the shaders. Both scenarios it seemed to only be using a single core.

System specs:
Ryzen 9 5900x
EVGA 3080 FTW3 on the latest drivers (512.59 at this time)
32GB DDR4 3600 CL16
UE5 and project are on a gen 3 NVMe drive
Unreal Editor version 5.0.1

Shaders section from the BaseEngine.ini file
[DevOptions.Shaders]
; See FShaderCompilingManager for documentation on what these do
bAllowCompilingThroughWorkers=True
bAllowAsynchronousShaderCompiling=True
; Make sure we don’t starve loading threads
NumUnusedShaderCompilingThreads=0
; Make sure the game has enough cores available to maintain reasonable performance
NumUnusedShaderCompilingThreadsDuringGame=4
; Core count threshold. Below this amount will use NumUnusedShaderCompilingThreads. Above this threshold will use PercentageUnusedShaderCompilingThreads when determining the number of cores to reserve.
ShaderCompilerCoreCountThreshold=12
; Percentage of your available logical cores that will be reserved and NOT used for shader compilation
; 0 means use all your cores to compile Shaders
; 100 means use none of your cores to compile shaders (it will still use 1 core).
PercentageUnusedShaderCompilingThreads=0
; Batching multiple jobs to reduce file overhead, but not so many that latency of blocking compiles is hurt
MaxShaderJobBatchSize=10
bPromptToRetryFailedShaderCompiles=False
bLogJobCompletionTimes=False
; Only using 10ms of game thread time per frame to process async shader maps
ProcessGameThreadTargetTime=.01
; For regular machines, wait this many seconds before exiting an unused worker (float value)
WorkerTimeToLive=20
; For build machines, wait this many seconds before exiting an unused worker (float value)
BuildWorkerTimeToLive=1200
; Set process priority for ShaderCompileWorker (0 is normal)
WorkerProcessPriority=-1

Any help is greatly appreciated! I am stumped!

2 Likes

A couple suggestions:

  • Currently you have NumUnusedShaderCompilingThreads=0 which means the engine will use all cores available for shader compilation. Typically you’d only want this to be the case on build machines, not developer machines. The default setting is 3, so you might want to start with that and see if it improves.
  • You also have WorkerProcessPriority=-1 which, when combined with the other setting, means that you are using all available cores running shader compilation at the lowest priority, hence why it took unusually long to free up a core for the loading thread to start loading the map. You can probably leave this setting as-is if modifying the other setting improves load times for you. I believe you have 12 cores in your machine so you can play around with the number of unused shader compile threads (i.e. loading threads) and shader worker priority to find the optimal balance for your machine.
  • Lastly, you have PercentageUnusedShaderCompilingThreads=0. It looks like this setting is new to UE5. The default is set to 50, so you might start there and continue lowering or raising it until you find a good balance for your machine. Actually looking at the actual ShaderCompiler code, it looks like unless the compiler was launched via commandlet or is running on a build machine, this setting will override anything set in NumUnusedShaderCompilingThreads or NumUnusedShaderCompilingThreadsDuringGame.
2 Likes

I had actually made the change to NumUnusedShaderCompilingThreads=0 based on a suggestion from another user on the Unreal forums (it was originally set to 3 when I had posted over there), it was unfortunately the same performance where it was only using a single CPU thread (overall CPU usage was below 10%). I’ll try changing the WorkerProcessPriority to 0 and the other setting to 50. It seems to only happen for the first launch of things as every subsequent launch is fast though so it may be a bit before I next encounter the issue.

Thank you for the suggestions so far

No problem. People get confused as to what that setting actually means - setting it to 0 is usually going to increase loading times because you’re telling the engine to use all available cores for shader compilation. Your CPU usage was probably low because of the priority setting.

Again, with UE5 neither of those settings is going to make a difference in your case since you’re trying to load a map in the editor. The PercentageUnusedShaderCompilingThreads is the setting you’ll want to play around with.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms