1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

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:
PouleyKetchoupp
2019-11-20 10:09:59 +01:00
parent 1ceb3d99a9
commit ccff2f2551
9 changed files with 242 additions and 162 deletions

View File

@@ -294,6 +294,7 @@ public:
virtual void apply_code() override;
virtual RES get_edited_resource() const override;
virtual void set_edited_resource(const RES &p_res) override;
virtual void enable_editor() override;
virtual Vector<String> get_functions() override;
virtual void reload_text() override;
virtual String get_name() override;