-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix freeze after building C# project with a lot of files #92893
Fix freeze after building C# project with a lot of files #92893
Conversation
27cd994
to
2f34bbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing to the .NET module. In general, the change makes sense to me but I'd like to confirm with the Editor team that they are OK with this.
I have also left some comments about the .NET changes.
modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
Outdated
Show resolved
Hide resolved
modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs
Outdated
Show resolved
Hide resolved
modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
Outdated
Show resolved
Hide resolved
2f34bbe
to
6d1e5b0
Compare
All the changes should be done. Thanks for your comments. |
modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
Outdated
Show resolved
Hide resolved
modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
Outdated
Show resolved
Hide resolved
6d1e5b0
to
893fdd3
Compare
893fdd3
to
6fecb8e
Compare
editor/editor_file_system.cpp
Outdated
if (!fs) { | ||
return; | ||
void EditorFileSystem::update_files(const Vector<String> &p_script_paths) { | ||
for (String file : p_script_paths) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (String file : p_script_paths) { | |
for (const String &file : p_script_paths) { |
Or is there a specific reason you didn't apply that part? This saves copying and the values aren't (and shouldn't) be modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad! done!
6fecb8e
to
7cc973b
Compare
modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
Outdated
Show resolved
Hide resolved
7cc973b
to
47b4acf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected and the changes to the mono module look good to me.
47b4acf
to
cc990ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editor changes look ok.
Thanks! |
Fix EditorFileSystem `update_files` after #92893
Fixes #92485
With the MRP project, on Godot 4.2, it took 1 min after rebuild.
With this modification, it now takes less then 1 sec.
I added the method
update_files
ineditor_file_system
that can take a list of files in parameter. Instead of callingupdates_file
fromScriptManagerBridge
for each file, I call this new method only once.I was the first time that I tried to modify the native functions between C++ and C# but I think I figured it out!!