godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.84k stars 20.15k forks source link

Running C# projects is slower since 4.3 #95559

Open TheLeanMonster opened 4 weeks ago

TheLeanMonster commented 4 weeks ago

Tested versions

v4.3.stable.mono.official [77dcf97d8]

System information

Godot v4.3.stable.mono - Windows 10.0.22621 - Vulkan (Forward+) - dedicated AMD Radeon R7 350 Series (Advanced Micro Devices, Inc.; 27.20.20913.2000) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

Issue description

opening the engine is significantly slower than previous versions and so is building projects,along with that sometimes the building process freezes and crashes and the first few frames after building the project is always a freeze frame,i also notice that during that freeze frame process time spikes to around 10ms maybe everything is being loaded all at once? image

Steps to reproduce

just build any project and turn on both FPS and processing monitoring

Minimal reproduction project (MRP)

N/A

TheLeanMonster commented 4 weeks ago

i also want to add that it looks like this problem comes from the forward+ renderer,maybe the Direct3D 12 is having problems with older hardware?

Calinou commented 4 weeks ago

Can you try following the same steps on 4.3 dev/beta/RCs to determine when the regression started? You can download them here.

Also, can you notice the same performance regressions with a non-C# build of the editor?

maybe the Direct3D 12 is having problems with older hardware?

The system information line you pasted states that you're using Vulkan. Direct3D 12 is not used by default – you need to opt into it by changing Rendering Driver.windows to d3d12 in the Project Settings.

TheLeanMonster commented 4 weeks ago

Can you try following the same steps on 4.3 dev/beta/RCs to determine when the regression started? You can download them here.

i finished testing on v4.3.beta3.mono.official [82cedc83c] the mono one still has the same problems but the normal version looks fine so maybe is a C# problem?

TheLeanMonster commented 4 weeks ago

wait a minute i just realised something did godot change .net version or is it still 6.0?i remember this morning reading a message about .net 6.0 no longer usable but i dont remember if its on godot or on visual studio but im 100% sure that the message was real,too bad i didnt screenshot but im pretty sure that the problem comes from .net

Calinou commented 4 weeks ago

wait a minute i just realised something did godot change .net version or is it still 6.0?

NET 8.0 is strongly recommended now (and is required to target Android/iOS), so I suggest upgrading your solution.

TheLeanMonster commented 4 weeks ago

yup,that seems to kinda work,i might also need to uninstall manually 6.0 from my pc since i had both 6.0 and 8.0 but now it looks like its running fine exept the first frames being frozen but i assume its normal? anyway the process time and FPS seems normal to me,at least its not taking years to build image

TheLeanMonster commented 3 weeks ago

ok nvm the problem seems to persist but its more of a random chance of happening and occasionaly rare,its still happening only on forward+ for now

SleepyMode commented 3 weeks ago

95765 is potentially related if this isn't exclusively a C# thing

you did mention some improvement moving from .NET 6.0->.NET 8.0, did you try comparing mono to non-mono again?