Only create the editor theme once
This prevents the editor theme from being created twice. This speeds up the project editor and editor startup significantly; startup is now 1.3 times faster on average (tested on a debug build). RAM usage was also lowered by 7.5 MB on average. This partially addresses #35321.
This commit is contained in:
@ -1218,7 +1218,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
||||
Ref<Theme> create_custom_theme(const Ref<Theme> p_theme) {
|
||||
Ref<Theme> theme;
|
||||
|
||||
String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme");
|
||||
const String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme");
|
||||
if (custom_theme != "") {
|
||||
theme = ResourceLoader::load(custom_theme);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user