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.4.beta2 editor freezes at every debugger/remote_scene_tree_refresh_interval when complex remote scene tree is open #102525

Open
DaZang opened this issue Feb 7, 2025 · 7 comments

Comments

@DaZang
Copy link
Contributor

DaZang commented Feb 7, 2025

Tested versions

  • Reproducible in v4.4.beta2.official [a013481] and v4.4.beta1.official [d33da79]
  • Not reproducible in v4.3.stable.official [77dcf97]

System information

Godot v4.4.beta2 - Windows 10 (build 19045) - Multi-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 32.0.15.6094) - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 threads)

Issue description

When the remote scene tree is open in 4.4.beta1 or 4.4.beta2 when playing a game in editor with a big scene tree the whole editor lags every 1.x seconds (or at every debugger/remote_scene_tree_refresh_interval).
The issue is not present in v4.3.stable.official [77dcf97]

Also reproduced on:

  • multiple game projects by multiple different people
  • different machine: Godot v4.4.beta2 - Windows 11 (build 22631) - Multi-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce MX450 (NVIDIA; 31.0.15.5274) - 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 threads)
  • 2D and 3D
  • Forward+ and Compatibility Renderer

Steps to reproduce

  1. Clone https://github.com/lampe-games/godot-open-rts on newest commit on main branch a628ad3bb6a9a903587a181a7ee3300dbf735e81
  2. Open project in Godot v4.4.beta2
  3. Run Project
  4. In game click "Play" then click "Start"
  5. In Godot editor open the Remote Scene Tree
  6. Open script editor and open a bigger script with scroll bars like "Match.gd"
  7. Drag the scroll bars and notice the editor freeze at around every 1.x seconds (or at every debugger/remote_scene_tree_refresh_interval in the editor settings)
  8. You can also try other editor actions like editing a script or drag the new embedded floating game window to notice the lag

Minimal reproduction project (MRP)

https://github.com/lampe-games/godot-open-rts
on newest commit on main branch a628ad3bb6a9a903587a181a7ee3300dbf735e81

@matheusmdx
Copy link
Contributor

Im able to reproduce the issue and seems a regression between 4.4 dev 3 and 4.4 dev 4. I'll start the bisect.

@matheusmdx
Copy link
Contributor

Bisected to #88427, @CrayolaEater

Image

@AeioMuch
Copy link
Contributor

AeioMuch commented Feb 8, 2025

Related #78645

@akien-mga akien-mga moved this from Unassessed to Bad in 4.x Release Blockers Feb 10, 2025
@akien-mga
Copy link
Member

I believe this was fixed already by #101489 in 4.4.beta3.

Can anyone confirm?

I've tested and I think I could reproduce the issue in 4.4.beta2 and not in 4.4.beta3/master, but the freeze isn't super visible on my setup so it's easy to misjudge.

@akien-mga akien-mga added this to the 4.4 milestone Feb 10, 2025
@akien-mga akien-mga changed the title Godot 4.4.beta2 editor freezes at every debugger/remote_scene_tree_refresh_interval when complex remote scene tree is open Godot 4.4.beta2 editor freezes at every debugger/remote_scene_tree_refresh_interval when complex remote scene tree is open Feb 10, 2025
@AeioMuch
Copy link
Contributor

AeioMuch commented Feb 10, 2025

I believe this was fixed already by #101489 in 4.4.beta3.

Can anyone confirm?

I've tested and I think I could reproduce the issue in 4.4.beta2 and not in 4.4.beta3/master, but the freeze isn't super visible on my setup so it's easy to misjudge.

I've tested with a debug build, and it is still present.
Also, both this issue and #98666 point to the same PR (#88427) as the cause of the regression. Applying #101435 does help if the remote tree is collapsed; but if you uncollapse everything in the remote tree, the freeze is present again, while without this patch (current master), even with the remote tree collapsed, the freeze is present. So it helps, but it is not enough.

@jaydensipe
Copy link
Contributor

jaydensipe commented Feb 11, 2025

Image

The main issue now are the TreeItem functions (namely get_minimum_size) being repeatedly called for each node. I tried looking into a fix, but I believe the minimum_size dirty flag and variable are reset each time the remote tree is updated (every remote_screne_tree_refresh_interval). If this function is commented out, the issue is around 80% better, with the rest of the slowness coming from how the engine rebuilds each node instead of caching (I think).

@fire
Copy link
Member

fire commented Feb 12, 2025

One more reports from rocketchat.

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

No branches or pull requests

7 participants