diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index be181377cbf..c6e122dde82 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: { }