-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 Godot opening(6s) due not caching data #35321
Comments
The SVG -> raster icon conversion takes a while. We could possibly cache the result on disk, but loading all the icons from disk may prove slower on HDDs (not sure). |
I have often wondered about this too. Although, instead of creating a caching system for procedural sky, we should just be switching to a default PanoramaSky (which is loaded from disk). |
@clayjohn That makes sense, but it means we need to embed one in the Godot binary or include one in every newly created project. However, HDRIs easily get quite large (though a simple gradient will likely compress well). |
Would a Procedural->Panorama by default change affect projects which already use Procedural sky? I don't think it would speed up opening existing projects, y'know... |
The difference is that the procedural sky has to generate the entire sky at load time (not sure how long it takes) and then generate radiance and irradiance maps (which right now take ~200ms). If we switched to a PanoramaSky, that could all be cached and it would just be a matter of reading from disk. |
|
No. But that is besides the point, this issue is about reducing startup time for the editor. Right now a new procedural sky is generated even for users who are working on 2D projects. This change would only affect the |
Aaah, ok, I get it. Good to know we're speeding up! <3 |
@clayjohn For people working on 2D projects, this can already be achieved by removing the |
This prevents the editor theme from being created twice. This speeds up the project editor and editor startup significantly; startup is now 1.3 times faster on average (tested on a debug build). RAM usage was also lowered by 7.5 MB on average. This partially addresses godotengine#35321.
Now with Godot 4.0.dev.custom_build. c9e1d98 |
I think it is needed for the default environment which is always loaded right now. I think when we make our changes to how the default environment works for 4.0 this won't be an issue. |
Closing in favor of #43351 because this issue was mainly created for 3.2 branch and since then opening times was improved |
Godot version:
3.2 RC 1
OS/device including version:
Ubuntu Mate 19.10
Intel i3 2330m HD 3000
Issue description:
On my laptop Godot opens in 6 seconds, which seems to be fast, but I think that we can get lower time.
Using Valgrind, Callgrind or GCC/Clang sanitizers cause that Godot opens 2x or even slower for some people.
I checked calls with Hotspot software available for Linux which use perf tool - https://github.com/KDAB/hotspot/releases
Project which I checked, contains only project.godot file, and I opened it more than once before(so cache should be active)
EditorHelp::generate_doc() - use almost 25% cycles and it can be split at two parts DocData::generate() - 17% and DocData::load() - 7%.
If I'm correct, then DocData generate each time same data every time when opening Godot and DocData loads results.
Godot execute twice(I don't know why) function create_edtior_theme(5,6% and 6,11%), which generates almost same editor icons each time. Most time this function spends in ImageLoader::_create_image().
There is also ProceduralSky::_update_sky function which execute ProceduralSky::_create_sky(8,14%) which generate Sky, which isn't cached or saved anywhere.
I think that that Sky and Editor theme should be cached, and cache should be checked/updated after every change of Godot version.
I think that docs should be also saved to file, but also I think that generation of docs should be run on different thread and until ends, script tab should be disabled.
Project manager opens in 2s, which is really fast, but there 2x create_theme take almost 44% of time. Probably Godot create every single icon, even if there are not used in Project Manager
The text was updated successfully, but these errors were encountered: