We run a nightly job that fixes up redirects and rebuilds texture streaming for all packages, with the following command-line:
UnrealEditor-Cmd.exe Path/To/My/Project.uproject -SCCProvider=Perforce -P4User=my_user -P4Client=my_client -Log -Unattended -NoPause -NoSound -BuildMachine -Run=ResavePackages -AutoCheckout -AutoCheckin -ProjectOnly -SkipCheckedOutPackages -IgnoreChangelist -OnlySaveDirtyPackages -FixupRedirects -BuildTextureStreamingForAll
We recently upgraded from UE 5.4 to 5.5, and when we did, we noticed that this above command-line, which used to take about 6.5 minutes, started timing out at 4 hours. From the logs, it’s clear that GC is absolutely dominating the runtime here, because almost every single package now requires waiting for static meshes to be ready:
[2025.04.23-12.27.03:960][ 0]LogContentCommandlet: Display: Loading MyProject/Content/__ExternalActors__/Maps/MyMap/KWKNPF35FR8YWZJDHSBNKW.uasset [2025.04.23-12.27.04:737][ 0]LogStaticMesh: Display: Waiting for static meshes to be ready 1/15 (/Game/Path/To/StaticMesh) ... [2025.04.23-12.27.04:770][ 0]LogStaticMesh: Display: Waiting for static meshes to be ready 3/15 (/Game/Path/To/StaticMesh) ... [2025.04.23-12.27.04:787][ 0]LogStaticMesh: Display: Waiting for static meshes to be ready 4/15 (/Game/Path/To/StaticMesh) ... [2025.04.23-12.27.35:934][ 0]LogUObjectHash: Compacting FUObjectHashTables data took 1.25ms
My theory on why this changed is this: https://github.com/EpicGames/UnrealEngine/blame/release/Engine/Source/Editor/UnrealEd/Private/Commandlets/ContentCommandlets.cpp\#L1959
I believe that in UE 5.4, these packages were resaved within the scope of ScopedGCFreq, but now because of this if (!bFixupRedirects) condition, they are resaved outside of this, and thus GC is done after every single package resave.
We can alleviate this issue by passing in the -GCFreq=N flag to batch GC up, but I wanted to raise this as it’s a massive performance regression in 5.5 if you’re not specifying a GC frequency as a command-line argument. It would be nice to fix the performance of this and go back to it Just Working!