diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-11-20 10:09:59 +0100 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2020-07-17 09:02:24 +0200 |
commit | ccff2f2551c5749e1c7d2976222013f582d767b1 (patch) | |
tree | b86e6561a5ad18f1f6b400a5b56a23127cad4c2e /editor/code_editor.cpp | |
parent | 1ceb3d99a9fe4d8857fcd9cd6e96ac47ec3e266d (diff) | |
download | redot-engine-ccff2f2551c5749e1c7d2976222013f582d767b1.tar.gz |
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)
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index d8648310b6..1884816386 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -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) { |