Godot: Having a few dozen sub-scenes slows down the editor tremendously.

Created on 3 Mar 2019  路  10Comments  路  Source: godotengine/godot

Godot version:

1b8f56c

OS/device including version:

Win10 64-bit

Issue description:

When having a lot of scenes nested inside of scene, the editor becomes incredibly laggy. The editing of these scenes have become very tedious, and nearing impossible.

Runs fine when launched.

@reduz I had encountered something like this in 2.1 a year ago (terrible load times), and you had mentioned it was resolved in 3.0. Any insight into this? A bit concerned since we're going to be having stages that will likely be several times more complex than what I've included here. I imagine this will drag everything to a halt at some point in the future.

Steps to reproduce:
Makes a few dozen scenes with a few dozen nodes, then combine into one scene.

Minimal reproduction project:

Note: Some things may be a little wonky, as I cut everything down from our main project to make it a manageable upload.
slow scenes.zip

bug input

Most helpful comment

ok, runs smooth as silk now.

All 10 comments

Cannot reproduce on Ubuntu, with amdgpu on R5.
If I double the number of scenes, it skips some frames while zooming but is still usable (just crashes when mass unlocking nodes).

@eon-s My PC is a bit on the older side of things, but it does run what I have smoothly outside of the Editor. The individual scenes run fine, but together it becomes trouble.

I also did get some crashes when doing some other operations on all the TSCNs. Something regarding cowdata, but will have to investigate further on how to reproduce it.

Windows 10 x64

I can somewhat reproduce the issue. Reproduction project does have slowdowns (I wouldn't call them incredibly laggy, but still). However, after moving a bit around and trying to open instanced scene from scene tree, I get a crash with this backtrace:

[0] CanvasItemEditor::_draw_hover (x:\inne\godot\source\godot\editor\plugins\canvas_item_editor_plugin.cpp:3020)
[1] CanvasItemEditor::_draw_viewport (x:\inne\godot\source\godot\editor\plugins\canvas_item_editor_plugin.cpp:3214)
[2] MethodBind0<CanvasItemEditor>::call (x:\inne\godot\source\godot\core\method_bind.gen.inc:139)
[3] Object::call (x:\inne\godot\source\godot\core\object.cpp:943)
[4] Object::emit_signal (x:\inne\godot\source\godot\core\object.cpp:1229)
[5] Object::emit_signal (x:\inne\godot\source\godot\core\object.cpp:1286)
[6] CanvasItem::_update_callback (x:\inne\godot\source\godot\scene\2d\canvas_item.cpp:455)
[7] MethodBind0<CanvasItem>::call (x:\inne\godot\source\godot\core\method_bind.gen.inc:139)
[8] Object::call (x:\inne\godot\source\godot\core\object.cpp:943)
[9] MessageQueue::_call_function (x:\inne\godot\source\godot\core\message_queue.cpp:256)
[10] MessageQueue::flush (x:\inne\godot\source\godot\core\message_queue.cpp:305)
[11] SceneTree::iteration (x:\inne\godot\source\godot\scene\main\scene_tree.cpp:477)
[12] Main::iteration (x:\inne\godot\source\godot\main\main.cpp:1861)
[13] OS_Windows::run (x:\inne\godot\source\godot\platform\windows\os_windows.cpp:2804)
[14] widechar_main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:151)
[15] _main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:173)
[16] main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:185)
[17] __scrt_common_main_seh (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283)
[18] BaseThreadInitThunk

Seems to happen randomly after zooming in a lot and repeatedly opening a scene. Tested on newest master.

I get the same backtrace as @KoBeWi.
Also, when playing the animation from the anim AnimationPlayer node in the counter scene, this error is spammed in the console:

ERROR: AnimationPlayer::_animation_update_transforms: Failed setting key at time 0 in Animation 'angles' at Node '/root/EditorNode/@@5/@@6/@@14/@@16/@@20/@@24/@@25/@@26/@@42/@@43/@@52/@@53/@@5079/@@4942/@@4943/@@4944/@@4945/@@4946/counter/aim', Track 'root/tilt_anchor/body_anchor/aim_anchor_B/recoil_anchor:influence'. Check if property exists or the type of key is right for the property
   At: scene\animation\animation_player.cpp:
870

This issue is about slowdown, open another with the crash report and animation player error @KoBeWi
@girng

Alright, well in regards to slowdown.. I'm on a GTX 950, W10, and i7 2600. Editor runs smooth for me. Can't reproduce :D. I was just thinking maybe some of those errors could be the culprit

Besides the fact @groud may need to optimize viewport drawing a bit, the main issue is the lack of accumulation of motion events. Godot should most likely implement this in order to avoid this kind of situation.

Works fine for Mac + AMD Radeon Pro 455

ok, runs smooth as silk now.

@reduz Yes, massive improvement in a1e73dc, it is functional again. X) 馃憤 馃憤 馃巻 Thanks for the quick response.

Seems others are getting errors in the animations, so was expecting that to be the culprit. So maybe there is some smoke from this that things still lurk in the AnimationPlayer? I will keep an eye in that area.

Was this page helpful?
0 / 5 - 0 ratings