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

The Remote Scene Tree causes jerky movement everytime it updates #13219

Open
Tracked by #47369
mrcdk opened this issue Nov 23, 2017 · 24 comments
Open
Tracked by #47369

The Remote Scene Tree causes jerky movement everytime it updates #13219

mrcdk opened this issue Nov 23, 2017 · 24 comments

Comments

@mrcdk
Copy link
Contributor

mrcdk commented Nov 23, 2017

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Godot 3.0 master 3a33725

Issue description:

In the example, Every time the Remote Scene Tree updates it causes some choppy movement. If I disable the auto switching to it under Editor settings / Debugger the issue disappear.

Steps to reproduce:

  1. Open the example and make sure the remote scene tree is opened.

Link to minimal example project:

level_test.zip

@kubecz3k
Copy link
Contributor

kubecz3k commented Nov 23, 2017

As far as I'm able to tell, I managed to observe the effect. Not sure if there is much we can do about it?
cc @Geequlim

@kubecz3k
Copy link
Contributor

kubecz3k commented Nov 23, 2017

Also for now it might be worth to consider if Auto switch to remote scene tree should be set to on by default.

@Zylann
Copy link
Contributor

Zylann commented Nov 23, 2017

Also, it reminds me this #8165

@kubecz3k
Copy link
Contributor

@Zylann huh seems like a duplicate... with the exception that as far as I can tell currently its enough to hide remote tree (open local instead of remote)

@reduz
Copy link
Member

reduz commented Nov 23, 2017 via email

@Zylann
Copy link
Contributor

Zylann commented Nov 23, 2017

@kubecz3k folded nodes should be taken in consideration though, not just all or nothing of the tree

@akien-mga akien-mga added this to the 3.0 milestone Nov 23, 2017
@Geequlim
Copy link
Contributor

I observe of your example project. The choppy movement also exist on my laptop but it doesn't disappear after I switched to local scene tree and inspect local object.

It didn't slow down or have anything changed even when I update the remote scene tree and remote inspector more frequently by changing Remote Scene Tree Refresh Interval and Remote Inspector Referesh Interval to 0.1.

My Hardware and driver information:

Arch Linux with Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)

@AWKgamedev
Copy link

AWKgamedev commented Dec 1, 2017

There's substantial stuttering for me, the graph is for a scene with about 2500 nodes.

godot engine - harmon_i_c - level 1-2 tscn

@akien-mga
Copy link
Member

Until the performance is improved, I suggest to make the remote scene tree opt-in. You don't need it all the time, only when you need to debug the scene tree.

@Geequlim
Copy link
Contributor

Geequlim commented Dec 1, 2017

And we don't need to update the remote scene tree or remote inspector so frequently.
There are settings to change the interval time for that in the editor settings.

@reduz
Copy link
Member

reduz commented Dec 1, 2017

the ideal fix would be to send the whole tree over many frames, though not sure if the problem is the scene tree or the property editing.

@akien-mga
Copy link
Member

Is this still valid in the current master branch?

@mrcdk
Copy link
Contributor Author

mrcdk commented Jan 5, 2018

Yes, it's still an issue in current master 8e82404

@akien-mga
Copy link
Member

I can't reproduce on my hardware with the test scene provided, but it's a relatively simple one (might be more visible with a lot more nodes to sync).

At any rate, the debugger defaults to Local now so the problem only triggers when you pick Remote manually, in which case it's a tradeoff for the additional information you requested so it's not too bad.

Could still be improved as mentioned by @reduz, but not critical for 3.0.

@akien-mga akien-mga modified the milestones: 3.0, 3.1 Jan 17, 2018
@AWKgamedev
Copy link

I'm still getting stutters with 3.0 rc1, but it's only really noticeable with 1000+ nodes.

@akien-mga
Copy link
Member

Is this still reproducible in the current master branch? I think it might have been fixed since then.

@mrcdk
Copy link
Contributor Author

mrcdk commented Jan 9, 2019

It's still happening in 382f099

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Feb 27, 2019
@SonnyBonds
Copy link
Contributor

I don't know if this helps or not, but before I saw this issue I threw a profiler on the problem and this is the result from that:
image
Feel free to ignore it if it's useless information, but I thought it could be a hint on what part of the scene update is taking time. (This is in an "artifical" scene with just hundreds of duplicated objects.)

@akien-mga
Copy link
Member

Still relevant in the current master branch (a1c396e) with the test project in OP.

@Zireael07
Copy link
Contributor

Still relevant, especially visible on projects with many nodes.

@rainlizard
Copy link
Contributor

rainlizard commented Apr 12, 2021

Dear god I was about to throw Godot in the garbage bin thinking it couldn't handle a decent amount of nodes without stuttering. It was very frustrating not knowing where the lag was coming from. The cause was this Remote Scenetree, it's almost more devastating to performance than the game itself!

I've got a complex tree, so my mass of nodes is quite buried (the problem isn't me being blind with the scenetree).

Possible suggestions:

  • Put a big warning on the "switch to remote scenetree" option. You can say this whole problem is self-inflicted because I didn't leave the Godot options at their default values, but that's silly, I had no idea why it wasn't enabled, it seemed like a good thing to enable so I enabled it. I fully expect every other person who looks through Godot options will do the same. Then one day they'll be complaining on social media about how Godot is a laggy engine.

  • The profiler wasn't showing the source of this stutter. At least lag from print() statements seems to be detectable since they're gdscript, but it might be worth considering putting other editor stuff that slows down the game into the profiler. So that we can realize what's going on.

  • If nodes are folded in the scenetree, maybe don't stress out the editor updating several thousand hidden things? I don't know how the updating works so this might not be feasible. But if the "obvious issue" is a "huge list of nodes", well it's not obvious, it's a folded issue you can't even see.

  • Only update the Remote Scenetree when the editor window is focused, not the game window (this suggestion might be unpopular).

Or maybe a mouse tooltip:
Untitled

@YuriSizov
Copy link
Contributor

Removing the high priority label since the assessment for this issue was to postpone the resolution for now.

@KoBeWi
Copy link
Member

KoBeWi commented Oct 4, 2022

Can anyone still reproduce this issue in Godot 4?

I tested with my super big project™ and it does not occur. I have another project where the issue is more apparent, but it's for 3.x unfortunately. I tried to do some minimal repro and I don't see any stutter with 10k+ nodes with script (although they didn't have any behavior). Would be nice if someone could confirm.

@DmitriySalnikov
Copy link
Contributor

v4.0.beta5.official [89a33d2]

Only 1 basic script for CharacterBody3D and many nodes
image
image
Godot_v4 0-beta5_win64_jfxOCAtxx3

This scene is imported via gltf from blender using the -col and -colonly flags. In blender this scene contains 2172 objects.
Extracted from Sonic Adventure DX.
image

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