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

Godot 4.1.1 slow/not snappy when changing nodes in tree #82105

Open
trevortjes opened this issue Sep 22, 2023 · 14 comments
Open

Godot 4.1.1 slow/not snappy when changing nodes in tree #82105

trevortjes opened this issue Sep 22, 2023 · 14 comments

Comments

@trevortjes
Copy link

trevortjes commented Sep 22, 2023

Godot version

4.1.1 stable (and 4.2-dev5)

System information

Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 950 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (4 Threads)

Issue description

Hi I was excited to try Godot 4 but to my surprise the UI is just sluggish and slow and not snappy at all as I am used to currently working in Godot 3.5.2.

Everytime I click a node or switch between nodes in the scene tree, there is often a delay of several 100s of milliseconds. I feel this the most with UI elements like buttons.

This video shows the behaviour in a random project in 3.5.2. Snappy and quick.

2023-09-22.10-49-51.mp4

This video shows the behaviour in the same project converted to Godot 4 BUT it also happens in new projects make for this version.

2023-09-22.10-54-00.mp4

I tried the latest 4.2-dev5, but the issue persists.

Steps to reproduce

Make any Godot 4 project on my machine with multiple nodes, especially UI nodes

Minimal reproduction project

testproject.zip

@m4rr5
Copy link
Contributor

m4rr5 commented Sep 25, 2023

Tried the test project on my system (Windows 10 (build 19045.3448), i9-9900KS @ 4 GHz, 32 GB RAM, RTX 2070 Super) and I don't see it lagging there. Video of me clicking: https://youtu.be/a2f5egg9bNc

@Calinou
Copy link
Member

Calinou commented Sep 25, 2023

Please test this in 4.2.dev5, as this is a regression in 4.1 that was fixed since.

Note that either way, your CPU is slow by 2023 standards (especially in terms of single-core performance), so you can't expect 4.x to always be as snappy as 3.x was.

@trevortjes
Copy link
Author

Please test this in 4.2.dev5, as this is a regression in 4.1 that was fixed since.

Note that either way, your CPU is slow by 2023 standards (especially in terms of single-core performance), so you can't expect 4.x to always be as snappy as 3.x was.

I already tested the behavior in 4.0-alpha1, 4.1.1 stable and 4.2-dev5. So pretty much the youngest to oldest version has the same behaviour.

And sure, it is dated hardware but if I can run so many software packages with ease, I certainly expect Godot to run as well. Especially if Godot 3 is flawless.

@trevortjes
Copy link
Author

I replicated the same behavior on a whole different machine with different specs:

Godot 4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics (Intel Corporation; 30.0.101.1404) - Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 Threads)

Seems to mostly happen with button nodes

@dkaste
Copy link
Contributor

dkaste commented Oct 3, 2023

The old/slow CPUs and the fact that selecting UI nodes is worse (more properties in inspector) makes me suspect this is due to the advanced TextServer implementation. In general, rendering text in the editor is much more CPU-intensive with it enabled. You could try using the fallback TextServer in a custom build with module_text_server_adv_enabled="no".

@trevortjes
Copy link
Author

Okay I managed to have someone compile 4.1.1 with the given flag. I guess I should've seen it coming but none of the text in the editor renders and when making a similar project like the minimal reproduction project, the problem persists.

image

At this point all fingers point at me having to upgrade my machine that can run Godot 3 flawlessly so it can cope with Godot 4. But as it is only button and label nodes (I think) it seems to be struggling with, it might just have to be me who has to cope.

@Zireael07
Copy link
Contributor

Huh, that's really interesting that none of the text renders. Probably worth making a separate issue?

@dkaste
Copy link
Contributor

dkaste commented Oct 5, 2023

I assumed that the fallback text server would be automatically enabled if the advanced one was disabled, but it appears that may not be the case. So it looks like you may need to compile the engine with module_text_server_fb_enabled=yes in addition to module_text_server_adv_enabled=no. Sorry for the mistake!

@TokisanGames
Copy link
Contributor

TokisanGames commented Oct 12, 2023

Regarding the advanced text server, I can confirm that the advanced text server severely slows down the editor when running a game. Building with module_text_server_fb_enabled=yes module_text_server_adv_enabled=no resolves it, including showing text just fine. Though it may not be related to this issue at all. If there are any issues regarding the text server, let me know so we can link these comments.

@Calinou suggested this issue might have the same cause as the slow remote scene tree #78645. Perhaps, but the advanced text server is definitely not the cause of my issue (It still may for this issue). See #78645 (comment) for more details.

@akien-mga
Copy link
Member

CC @bruvzg

@bruvzg bruvzg self-assigned this Oct 12, 2023
@trevortjes
Copy link
Author

Tried it again on another machine with a more powerful CPU. The snappiness sure is better, but every now and then a "lagspike" is still occurring when switching selected UI node.

Godot v4.1.2.stable - Windows 10.0.19044 - Vulkan (Forward+) - dedicated Quadro P400 () - Intel(R) Core(TM) i7-8700K cpu @ 3.70GHz (12 Threads)

@w568w
Copy link

w568w commented Nov 15, 2023

CPU is slow by 2023 standards (especially in terms of single-core performance), so you can't expect 4.x to always be as snappy as 3.x was.

I can also confirm that this happens even on a much more powerful CPU & GPU, and it seems to be almost as slow between my PC and laptop when jumping among different nodes:

Godot: 4.1.2 Stable
OS: Windows 11 22H2 22621
GPU: NVIDIA RTX 3070
CPU: Intel(R) Core(TM) i7-13700KF
Godot: 4.1.2 Stable
OS: Archlinux x86_64 rolling
GPU: NVIDIA GeForce GTX 1650
CPU: AMD Ryzen 7 4800H

@Mupli
Copy link

Mupli commented Nov 16, 2023

I have same problem in 4.2 beta 5 (mono).
Moving node in the tree takes around 5-7 seconds same with renaming.
Though .. Disabling Synchronize script changes and debug server helps and now it is around 1-2 seconds.

@CaptainCaptcha
Copy link

I have the same problem in 4.1.3-stable. It's too frustrating, any temporary solutions ?

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