Skip ResourceLoader's progress query if not requested.#113117
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Nov 24, 2025
Merged
Skip ResourceLoader's progress query if not requested.#113117Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
RandomShaper
approved these changes
Nov 24, 2025
Member
RandomShaper
left a comment
There was a problem hiding this comment.
I'd suggest adding a comment.
45ef14e to
f0e57a7
Compare
clayjohn
approved these changes
Nov 24, 2025
Member
clayjohn
left a comment
There was a problem hiding this comment.
Makes sense. This also avoids a lot of unnecessary work that happens within the MutexLock, so its nice to have this optimized in any case
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This complements #113114 in the sense that ResourceLoader's threaded progress computation should be skipped if not requested by the user. As it is now, progress is computed regardless only to be discarded if the user didn't specify an array to use for the returned value.
This also avoids the critical issue explained in the linked PR, where projects that use the background loader with several threads can end up causing infinite recursion scenarios when computing the loading progress, leading to a crash. However, the crash will remain possible for projects that do query the progress unless the linked PR is merged.
This one should be fairly safe to merge and results in a small optimization as well.