Visual Studio 2022 is 64 bit and compiles and runs UE 5.0 EA approximately 20% FASTER

hi @NavJack27 There are more problems than you saw in [ue5-main] . The program won’t generate the ue5.sln.
UPDATE for VS2022 RC1 P5 and UE5-main
I have got it working in
Visual Studio 2022 Preview 7 now builds and runs [ue5-main-vs2022]

Hi, @Marius_Sheppard @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview 3.

During my continuous testing of UE5EA, I have identified a problem with both VS2019 and VS2022 P3. Please don’t use the Right-Click “Find All References”, but instead use the “Find in Files”, “Find All”.

Microsoft Visual Studio Engineering appreciates and is interested in the work on testing UE5EA and this repository.

The summary is that there are approximately over 8500 references to some C++ functions in UE5EA and “Find All References” uses IntelliSense from the version VS2019 16.11. This causes VS2022 P3 to generate 17 extra processes of up to 1GB effectively stopping/ freezing any Windows 10 PC without a 64GB pagefile.sys

I have reported the problem to Microsoft and its “Under Consideration”. I feel this is a good result for UE5EA because it is giving MS VS 2022 Engineering a chance to use UE5 as testing for the final release of UE5 and VS2022.

For those who are want to see the report
Preview 3.1 Enabled all IntelliCode Preview Features very slow/crashes while doing “Find References” - Visual Studio Feedback

My thanks to all of you who have tested this repository

3 Likes

Hi, @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview. Visual Studio 2022 Preview 4 is now out and I have built this UE5EA-vs2022 repository without error.

There are many new features in Preview 4 that will now build the ue5-main repository because it reverts to VS2019 code as a result of the new Intellisense features.

2 Likes

Hi, @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview. On November 8th 2021 will see the release of the production version and no longer in Preview.
VS 2022 Preview 7 Release Candidate 2 builds UE5EA.

I have installed a new version of the Quixel Bridge plugin version 2021.0.4 in my repository. This is the same as the binary version used in the Epic Marketplace Launch app for binary UE5.0 EA2.

I have tested and built this. The problem with Windows Packaging/Cooking is now fixed

Note to Everyone on Unreal Engine builds you must use an NVRAM/SSD to build UE5.
My recent build on a fast IDE hard drives to 26787 seconds 6.45 hours. :nauseated_face::thinking:

The SSD/NVRAM version take 4767 seconds :grin::sunglasses::heavy_check_mark: 78 minutes

Preview RC2 now builds 200 seconds faster!
Total time in Parallel executor: 4353.28 seconds​:grin::heavy_check_mark:

Visual Studio 2022 won’t be allowed installed on an IDE when an SSD exists.

2 Likes

Hi Jimbohalo10,

could you please give me an advice.

I have

  • downloaded Ue5 branch from git
  • do setup.bat
  • GenerateProjectFiles.bat -2022 ( to force create vs 2022 project files )

the specs of my pc:

  • win 10
  • super fast ssd with 500 gbyte free memory
  • ryzen 5900 ( 12 core cpu )
  • 16 gbyte RAM

My Problem: compilation of a e.g. debug gameeditor is very slow

e.g. with this build log i can verify that 2022 toolchain is used:


Parsing headers for UnrealEditor
13> Running UnrealHeaderTool UnrealEditor “C:\unreal2\Engine\Intermediate\Build\Win64\UnrealEditor\Debug\UnrealEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\unreal2\Engine\Programs\UnrealBuildTool\Log_UHT.txt”
13>Reflection code generated for UnrealEditor in 8,8303405 seconds
13>Creating makefile for ShaderCompileWorker (no existing makefile)
13>Parsing headers for ShaderCompileWorker
13> Running UnrealHeaderTool ShaderCompileWorker “C:\unreal2\Engine\Intermediate\Build\Win64\ShaderCompileWorker\Development\ShaderCompileWorker.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\unreal2\Engine\Programs\UnrealBuildTool\Log_UHT.txt”
13>Reflection code generated for ShaderCompileWorker in 0,2307619 seconds
13>Building UnrealEditor and ShaderCompileWorker…
13>Using Visual Studio 2022 14.30.30705 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705) and Windows 10.0.20348.0 SDK (C:\Program Files (x86)\Windows Kits\10).


Determining max actions to execute in parallel (12 physical cores, 24 logical cores)
13> Executing up to 12 processes, one per physical core
13> Requested 1,5 GB free memory per action, 8,11 GB available: limiting max parallel actions to 5
13>Building 5673 actions with 5 processes…
13>[1/5673] Resource Default.rc2
13>[2/5673] Compile MiMalloc.c
13>[3/5673] Compile PCH.Core.cpp
13>[4/5673] Compile SharedPCH.CoreUObject.ShadowErrors.cpp

the compiler reserves 1,5 gbyte per action so only 5 parallel compiling threads are running.
to me this seems very conservative, because the whole time there a serveral gbytes of free ram acording to the resource monitor.

as i see, your pc also has 16 gbyte ram but seems to compile much faster, does your pc use maximul cores you have ?

Compiling time is at least 3 hours, that is so frustrating

Many thanks for every advice you have

1 Like

Hi @Bettina4you,
You need a large pagefile.sys to make up for the lack of RAM memory
see Can’t create C++ project ( or use C++ ) - Unreal Engine 5 Early Access / Feedback for Unreal Engine 5 Early Access - Unreal Engine Forums

In this case, I used 32GB, but now with the current version you will need 64GB to achieve that speed and make sure the UE5 is on the SSD drive and you drives have been trimmed and fragmented.

Hi Jimbohalo10,

thanks for your answer, but sorry no succes.

On my machine, changing the system pagefile, reboot etc. does not change anything, about my problem !

I have ordered a ram extension 32 gbyte ( 2x16 ) then the problem should be solved.

1 Like

Fragmenting SSDs is a no-no, isn’t it? It’s a problem with HDDs, not SSDs.

Hi Yes yo its trimming SDD and defregement any HDD

No one is using IDE dude. Just call them HDD. Spinning rust uses SATA.

Hi, @Knauric and Everyone reading. This thread. Firstly thank you for using Visual Studio 2022 Preview.
I have just updated VS2022 to Version 17.1.0 Preview 2.0
When loading for the first time there are several warning messages.

The most important is that on the top right under the Solution Explorer is a message saying that the UE5 project is targeting a Net Core version 3.1 which is not installed.

The way to FIX this is to follow the advice and let Visual Studio Installer add the missing Net Core 3.1.
The annoying messages about missing toolsets disappear. Now simply shutdown with the top RHS red x and restart.
This time there aren’t any messages and in a few seconds, you are ready to start work.

Update 16th January 2022
When trying to “Build Lighting” you must now “MANUALLY” build UnrealLightmass.exe in UE5.0 in Solution explorer scroll down to programs right click on UnrealLightmass and select “Build” the output log will show about 89 files being compiled with UnrealLightmass.exe as the final.
Restart UE5 and the project and when you try “Build Lighting” there will be a build log, not an error log.
Local builds are very quick compared with Swarm remote builds, but you much enable this in Swarm Settings tab.

1 Like

Hi . I’m new on Visual Studio 2022 and I need your help.

Currently I used UE4.27 on my project and I’m facing an annoying problem that is “Lighting build failed. Swarm failed to kick off. Compile Unreal Lightmass”.

From all the tutorials I saw on YouTube, they used Visual Studio 2022 to fix the problem.

Unfortunately, I did not manage to use it. I’m trying so many time.

My Project file stored in File D. My question is, VS2022 only able to read files stored in C files? What if my project stored in D files, do i need to move it to C file for me to use VS2022.

Hi @Salwa_Razak,
I have previously built 4.27 on VS2019 and VS2022.
The error

“Lighting build failed. Swarm failed to kick off. Compile Unreal Lightmass”.

Can be fixed by the following procedure. Your project can be on any drive, but the full path must be less than 25 characters. Your project file name must be less than 20 characters.

You will need to build a 4.27 source UnrealLightMass project in VS as in the picture below

using the 4.27 unreal Source

Next you need to open a new project like the Third Person Shooter.
in Top bar menu “Build Lighting Only” the Swarm Manager starts up

This will start the Swarm Control. Select Settings

Next you need to open a new project the Third Person Shooter again
in Top bar menu “Build Lighting Only” the Swarm Manager starts up.

This time the screen will display “Building Lighting…”
Finally a box will say “Lighting build completed”

1 Like

Hi Jim.
unfortunately I lose UnrealLightmass.
I have no idea what had happened .
What should I do?

Hi @Salwa_Razak,
If you cannot find the 4.27 source then follow the post which explains how to register for the source.

Linking to GitHub account is successful but does not grant access - AnswerHub - Unreal Engine Forums

Then clone the 4.27 source code
$ mkdir source\repos
$ cd source\repos
$ git clone https://github.com/EpicGames/UnrealEngine.git -b 4.27
$ cd 4.27
$ setup.bat
$ GenerateProjectFiles.bat -2022 or 2019 if you want
open Ue4.sln using Visual Studio
Right-click UE4 project and “Build”

Then carry out the instructions above for UnrealLightMass project

The only way I found to get rid of this problem, looking inside UBT code, is to edit the BuildConfiguration.xml file (Engine/Saved/UnrealBuildTool/BuildConfiguration.xml) with this:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<ParallelExecutor>
<MemoryPerActionBytes>0</MemoryPerActionBytes>
</ParallelExecutor>
</Configuration>

I have a low spec PC, and it gave to me 1 action in parallel message (because I have 8 GB of RAM with an i7-3770 CPU) before, which was very frustrating, but now it’s back again to 4.
Hope this helps everyone in the same situation (even someone with good CPU and low physical RAM)

4 Likes

FYI if you’re doing this MemoryPerActionBytes hack on a machine with 16GiB or less of RAM: Visual Studio uses a lot of memory nominally, but it’s not actually using this memory—increasing Windows’ pagefile size makes this work far more reliably.

  • Increase this by searching “Advanced System Settings” or going to sysdm.cpl > Advanced, then Performance > Settings > Advanced > Virtual Memory > Change > Paging Size For (C:) > Custom
  • You must click the button Set to apply the changes!
  • You do not actually need to reboot afterwards to apply the changes!
1 Like

Hi All, Well its two years on and Visual Studio 2022 is MANDITORY DEFAULT for Unreal Engine 5.3 VS2022 has the new C++ 20 compilier and with many others features for version 17.8.
I promised if people used UE5 on VS2022 MS would optimised VS2022 for UE5 and they have. Thank you to all who help bring it this far and keep up the good work