You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Speed up GDScript::get_must_clear_dependencies()
get_must_clear_dependencies() has a N^3*log(N) time complexity, and this can very quickly slow down the quitting process as more gdscripts are added in a project. This change improves it to N^2*log(N). Instead of using all the inverted dependencies, we do the same with all (non-inverted) dependencies, which is N times faster. Fixes #85435
This commit is contained in:
@@ -254,7 +254,7 @@ public:
|
||||
const Ref<GDScriptNativeClass> &get_native() const { return native; }
|
||||
|
||||
RBSet<GDScript *> get_dependencies();
|
||||
RBSet<GDScript *> get_inverted_dependencies();
|
||||
HashMap<GDScript *, RBSet<GDScript *>> get_all_dependencies();
|
||||
RBSet<GDScript *> get_must_clear_dependencies();
|
||||
|
||||
virtual bool has_script_signal(const StringName &p_signal) const override;
|
||||
|
||||
Reference in New Issue
Block a user