You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Improve Editor Inspector/Theme item lookup performance
Changes to reduce the latency between changing node selection in the editor and seeing the new node reflected in the Inspector tab - Use Vector instead of List for ThemeOwner::get_theme_type_dependencies and related functions - Use Vector instead of List for ThemeContext::themes, set_themes(), and get_themes() - Add ClassDB:get_inheritance_chain_nocheck to get all parent/ancestor classes at once, to avoid repeated ClassDB locking overhead - Update BIND_THEME_ITEM macros and ThemeDB::update_class_instance_items to use provided StringNames for call to ThemeItemSetter, instead of creating a new StringName in each call These changes reduce the time taken by EditorInspector::update_tree by around 30-35%
This commit is contained in:
@@ -205,7 +205,7 @@ void ThemeEditorPreview::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_READY: {
|
||||
List<Ref<Theme>> preview_themes;
|
||||
Vector<Ref<Theme>> preview_themes;
|
||||
preview_themes.push_back(ThemeDB::get_singleton()->get_default_theme());
|
||||
ThemeDB::get_singleton()->create_theme_context(preview_root, preview_themes);
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user