You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +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:
@@ -487,7 +487,7 @@ void EditorNode::_update_theme(bool p_skip_creation) {
|
||||
DisplayServer::set_early_window_clear_color_override(true, theme->get_color(SNAME("background"), EditorStringName(Editor)));
|
||||
}
|
||||
|
||||
List<Ref<Theme>> editor_themes;
|
||||
Vector<Ref<Theme>> editor_themes;
|
||||
editor_themes.push_back(theme);
|
||||
editor_themes.push_back(ThemeDB::get_singleton()->get_default_theme());
|
||||
|
||||
@@ -556,7 +556,7 @@ void EditorNode::update_preview_themes(int p_mode) {
|
||||
return; // Too early.
|
||||
}
|
||||
|
||||
List<Ref<Theme>> preview_themes;
|
||||
Vector<Ref<Theme>> preview_themes;
|
||||
|
||||
switch (p_mode) {
|
||||
case CanvasItemEditor::THEME_PREVIEW_PROJECT:
|
||||
|
||||
Reference in New Issue
Block a user