Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton Heavy CPU Bottleneck #93568

Open
mrjustaguy opened this issue Jun 24, 2024 · 3 comments
Open

Skeleton Heavy CPU Bottleneck #93568

mrjustaguy opened this issue Jun 24, 2024 · 3 comments

Comments

@mrjustaguy
Copy link
Contributor

Tested versions

Tested 4.3 beta 1

System information

Windows 11, i3-10105f, RX6600 24.5.1, Forward+

Issue description

Skeletons seem to absolutely trash CPU performance.
Editor reports over 30ms cpu frame time with skeletons vs 3ms for non skeletal copy of the scene

Only one thread is above 5% utilization, and the one that is being utilized keeps switching between 60% and 100% utilization despite locked frequency (so the utilization percentages aren't falsely being reported as 100% when the frequency drops)

This has been reported on before (#90943), but Hasn't provided samples for testing, so that's what I'm doing here.

do note, I've observed Shadows to be especially hard on the CPU, which is how I've first encountered this issue in my Project with only about a 100 skeletons and half a dozen omni lights and a sunlight casting shadows, while in the MRP to keep it simple I just threw 2 thousand skeletons to make the bottleneck more apparent and easier to diagnose.

Steps to reproduce

Open MRP

Compare Non Skeleton vs Skeleton Scene CPU Performance Metrics

Minimal reproduction project (MRP)

Perf test.zip

@JekSun97
Copy link
Contributor

On Godot 4.3 beta2 shows 20 frames per second, with skeletons, without skeletons everything is stable.

Godot v4.3.beta2 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated Radeon RX 560 Series (Advanced Micro Devices, Inc.; 31.0.14001.45012) - Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 Threads)

@nicoszpako
Copy link

nicoszpako commented Jul 4, 2024

Same here, I noticed this huge drop in performance when I have a lot of Skeleton3D (around ~100) loaded in a scene. What is weird is that it runs pretty well in the editor, as it is mentioned here (the problem may be linked).

Disabling the process of the Skeleton3D while the game is running brings back the FPS.

Godot v4.3.beta2 - AMD Ryzen 7 3800X - RTX 2070 - Windows 10

@Saul2022
Copy link

Saul2022 commented Oct 3, 2024

The reasson of the slowdown the more skeleton you add is because of lack of multi threaded animation, it seem’s kind of similar to the other that had a lot of skeletons , though nazar is making an awesome job with his optimizations in core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants