-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Slow editor startup with large number of opened scripts in the script editor #39841
Comments
It should probably save layouts only when the editor closes or when asked to do so using Save Layout. |
Yeah that's probably one of the problems to address. I tested this on During this time I've had an opportunity to capture the real-time I/O shenanigans Godot does with the project: As you see, it's not only the layout, but When it finally stopped, it crashed:
Not related to this issue, because I've got these kind of crashes previously on I may take a look at solving this on 3.2 branch (cannot use |
See #33760 |
Thanks, surprisingly I'm actually the one who reacted with 🎉 on that PR months ago, but I haven't experienced the issue back then to realize the performance impact, perfect timing though. 😄 |
Actually I've created a small plugin which allows you to automatically clear the list of opened scripts on editor exit (I don't see how seeing the history from other sessions is useful personally). This alone workarounds and shadows the underlying issue, But this is still an issue nonetheless, and I wonder whether #33760 could provide other run-time performance enhancements other than startup times, and likely yes due to:
which is characterized by quite laggy panel split dragging as described in the issue. |
Actually I've figured there's already an editor setting for that...
Expected it to be under So the above plugin as a workaround is overkill indeed, unless you want to prevent documentation pages to be there specifically. |
Godot version:
3.2.2.stable, 4.0-dev
OS/device including version:
Windows 10
Issue description:
Starting a project with over 100 scripts opened in the script editor negatively affects the startup times.
On a project with 500 small scripts opened in the script editor, it takes around 15-20 seconds before the editor becomes responsive. If you close all scripts with
File
→Close All
and restart Godot, it takes around 3-6 seconds, as usual.Steps to reproduce:
It's quite time consuming to do this manually, so proceed to the minimal project instructions.
Minimal reproduction project:
script-editor-slow-startup.zip (includes 500 scripts)
Unpack minimal project.
Run the project.
Close the project.
Copy and replace the included
editor_layout.cfg
file to the path where project-specific editor settings and cache are stored (on Windows the path may be similar toC:\Users\Profile\AppData\Roaming\Godot\projects\script-editor-slow-startup-%MD5%
). That way when you open Godot, all the project scripts will be opened in the script editor. You can also navigate this via menu:Run the project and notice slow startup.
Notes:
MessageQueue
size is increased to allow loading over 500 scripts in the minimal project (Change MessageQueue to a page allocator to prevent overflow #35653).editor_layout.cfg
while doing so, and it seems like it does this for each and every script as well.Close All
produces similar editor hang as the editor startup.Workaround:
There's currently no editor option to disable this feature. Make sure to close old opened scripts regularly.Actually there is: #39841 (comment).I've created a plugin which does that automatically, bypassing this issue currently in 3.2: #39841 (comment).
Related issues
Marginally related to #9815.
The text was updated successfully, but these errors were encountered: