-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Saving complex scene with multiple exports var statements and instanced sub-scenes takes up to minutes #43156
Comments
The editor also freezes when you open and close a script from any node. |
I wonder if this is fixed in master? |
Master requires a separate MRP, because exports are incompatible. |
@fire still happening with master / 50da616. MRP for master: slow-saving-mrp-master.zip |
I investigated this issue a bit and tracked it down to this method: godot/core/script_language.cpp Lines 482 to 524 in 5bb7c7c
Placing Also here's better MRP for master, because the above one is invalid: |
godot/core/script_language.cpp Line 518 in 5bb7c7c
|
Weird, because I checked that and removing it made no difference. |
@KoBeWi you are right, I jumped to a conclusion there, sorry. |
I narrowed cause of slow saves is here: Lines 1428 to 1435 in 61c8efe
...which was introduced by 383dea5 (with later changes) |
As a workaround I just removed that part from my version of the engine and I can work again, but I suppose it re-introduces the sub-inheritance bug @RandomShaper fixed with that. |
Allow me to demonstrate the scale of the problem in 3.3-rc8. This video shows opening and saving scene once, in realtime. It takes 5 minutes to open the scene and over 15 minutes to save it (for each save): https://youtu.be/U-Ut_7x1uWA |
#47828 would only fix the slow saving, in my tests it still takes ages to open the scene in the MRP. Since it might introduce regressions and it's pretty late, I made a version for But if it doesn't help with loading that scene, it seems the problem is deeper than that. In my tests, disabling that code makes the scene saving take ~40 s (compared to 15 minutes before, so that's a win). Opening the scene still takes ~3 min for me. |
Allows working around godotengine#43156. This is an opt-out setting for users who need it, until we can establish that fully removing this code would not reintroduce the bug it aimed to fix (godotengine#7976). Co-authored-by: Mariusz Chwalba <mariusz@chwalba.net>
Not sure if that's any help, but I observe similar slowdowns also when I am renaming objects in tree. |
I think debugging the slow opening for this specific scene should help figure out what the real bug is, and possible solve all symptoms at once (slow opening, slow saving, slow renaming). It seems to spend a lot of time creating placeholder instances for each instantiated scene and there's plenty of them with multiple levels of sub-instances, which seems to trigger a pathological case:
Won't have time to debug further for now, anyone is welcome to pick it up from here. |
Allows working around godotengine#43156. This is an opt-out setting for users who need it, until we can establish that fully removing this code would not reintroduce the bug it aimed to fix (godotengine#7976). Co-authored-by: Mariusz Chwalba <mariusz@chwalba.net>
I'd like to chime in to say that this is an issue for me as well, and removing the dummy scene does in fact make saving the scene become basically instantaneous. |
Godot version:
3.2.3-stable-official, also tested with 3.2.4-beta1
OS/device including version:
Windows 10
Issue description:
Saving a scene in the MRP takes up to couple of minutes, making editing it unusable. Editor is stuck unresponsive at:
Steps to reproduce:
res://comms/conversation/MinerConversation.tscn
Scene should save in fraction of the second, but it hangs on application unresponsive for minutes, making editing the game unpractical. It also happens to every scene this one is instanced in, including "Load as Placeholder" option.
Minimal reproduction project:
slow-saving-mrp.zip
Notes
All the nodes in the scene are instance of same class - it's a representation of dialog tree of the game. I was able to determine that it's somehow related to
export var
statements - if you remove them fromres://comms/ConversationPlayer.gd
scene saves with expected speed.I was not able to produce a synthetic MRP, so this above is stripped-down dialog tree directly from ΔV: Rings of Saturn.
The text was updated successfully, but these errors were encountered: