-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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 noticeable freeze after saving a scene #93147
Conversation
03115cd
to
4dfd741
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.
Tested locally, it works as expected.
However, I can't reproduce #93104 on an optimized editor build (optimize=speed lto=full
). Saving is quite fast both before and after this PR, although it's slightly faster with this PR. This is also the case with a debug build (saving takes ~800 ms in master
, ~700 ms with this PR).
In both cases, the FileSystem dock gets scrolled up when saving the scene. I'd prefer if the existing scroll bar position was kept instead, but that should be looked into in its own PR.
PC specifications
- CPU: Intel Core i9-13900K
- GPU: NVIDIA GeForce RTX 4090
- RAM: 64 GB (2×32 GB DDR5-5800 C30)
- SSD: Solidigm P44 Pro 2 TB
- OS: Linux (Fedora 39)
Thanks for testing this PR. For the scrollbar, I don't have the same issue about the scroll bar position. My PC specifications: Master version: Taskmgr_68ui63bvr9.mp4This PR version: Taskmgr_hsjTUfLPqD.mp4 |
acf7a8c
to
9772532
Compare
9772532
to
de0f6bd
Compare
One difference I found with my latest modifications are icons for the script that have a Should I removed this line? |
Technically it's consistent with the inspector showing icon in Script field, but personally I find it annoying. I think scripts should show script icon (for their language), not their |
I tend to agree with you. I'll revert it to what it was before. |
de0f6bd
to
f1aafa2
Compare
Done! |
f1aafa2
to
8ac841a
Compare
Thanks! |
Fixes #93104 and maybe #92515
After testing with a project having a lot of Resources I was able to reproduce the problem.
MRP:
test-godot-resource-icon.zip
The problem came from the modifications in
_get_entry_script_icon
for the management of the resource icons, more specifically the calls toResourceLoader::get_resource_type
andEditorFileSystem::get_singleton()->find_file
:I reused the cache that was there but instead of resetting the cache at each
_update_tree
, I created aclear_icon_cache
method and called it only when an icon script or a resource changes. I probably missed some places where the icons could change!?!It's really not perfect but I guess the performance should be the same as before #77932.
My tests with 3000 resources:
Before: 4-4.5 seconds
After: 1.5-2 seconds
The time remaining on a save occurs in the Tree, I'm really not sure I should touch that: