From 77879d4288443fcacb0668bd867438b53bd800ae Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 29 Nov 2023 12:31:48 +0100 Subject: [PATCH] Update NodePaths only in built-in resources --- editor/scene_tree_dock.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index be181377cbf1..c6e122dde823 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1812,8 +1812,6 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var } } break; -// FIXME: This approach causes a significant performance regression, see GH-84910. -#if 0 case Variant::OBJECT: { Resource *resource = Object::cast_to(r_variant); if (!resource) { @@ -1825,6 +1823,11 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var break; } + if (!resource->is_built_in()) { + // For performance reasons, assume that scene paths are no concern for external resources. + break; + } + List properties; resource->get_property_list(&properties); @@ -1841,9 +1844,7 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var undo_redo->add_undo_property(resource, propertyname, old_variant); } } - break; - }; -#endif + } break; default: { }