Optimized ScriptEditor initialization when many scripts are loaded
This change avoids the editor to freeze for several seconds when a project with lots of scripts is loaded in the editor. It focuses on a few heavy operations previously executed on all previously loaded scripts: - Initialize script resource (script validation/parsing) only on focus - ScriptTextEditor: code editor and edit menu are added to the scene only on focus - Add to recent scripts only when opening new scripts (load/save scene metadata)
This commit is contained in:
parent
1ceb3d99a9
commit
ccff2f2551
9 changed files with 242 additions and 162 deletions
|
|
@ -1456,8 +1456,6 @@ void CodeTextEditor::set_edit_state(const Variant &p_state) {
|
|||
text_editor->set_line_as_bookmark(bookmarks[i], true);
|
||||
}
|
||||
}
|
||||
|
||||
text_editor->grab_focus();
|
||||
}
|
||||
|
||||
void CodeTextEditor::set_error(const String &p_error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue