godotengine / godot

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

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

Open mrcdk opened 6 years ago

mrcdk commented 6 years ago

Operating system or device, Godot version, GPU Model and driver (if graphics related): Godot 3.0 master https://github.com/godotengine/godot/commit/3a33725014169ce51d6ac581a4dce3b97a60da00

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 commented 6 years ago

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 commented 6 years ago

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

Zylann commented 6 years ago

Also, it reminds me this https://github.com/godotengine/godot/issues/8165

kubecz3k commented 6 years ago

@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 commented 6 years ago

Should be modified to send this information over many frames to avoid stall

On Nov 23, 2017 5:38 PM, "kubecz3k" notifications@github.com wrote:

@Zylann https://github.com/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)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/13219#issuecomment-346694600, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z25FdFp4Cpksu0m19QPCwyPqeqQjyks5s5dfMgaJpZM4QpI3q .

Zylann commented 6 years ago

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

Geequlim commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Is this still valid in the current master branch?

mrcdk commented 6 years ago

Yes, it's still an issue in current master https://github.com/godotengine/godot/commit/8e8240450edc48f4fb379e593a4ef7f54ab656b7

akien-mga commented 6 years ago

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.

AWKgamedev commented 6 years ago

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

akien-mga commented 5 years ago

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

mrcdk commented 5 years ago

It's still happening in https://github.com/godotengine/godot/commit/382f0991ee7ece2a99cfbdbf641d46777b8c8edf

SonnyBonds commented 5 years ago

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 commented 4 years ago

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

Zireael07 commented 3 years ago

Still relevant, especially visible on projects with many nodes.

rainlizard commented 3 years ago

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:

Or maybe a mouse tooltip: Untitled

YuriSizov commented 1 year ago

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

KoBeWi commented 1 year ago

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 commented 1 year ago

v4.0.beta5.official [89a33d28f]

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