Skip to content
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 ResourceLoader is not printing a resource path on loading when verbose_stdout is enabled #94920

Conversation

gongpha
Copy link
Contributor

@gongpha gongpha commented Jul 29, 2024

Fixes the issue from this post.

When any resource is going to be loaded and has the verbose_stdout setting enabled, the resource loader prints Loading resource: <resource path> (and Failed loading resource if failed). But after 4.1, this resource loader doesn't print it anymore.

The current version of the ProjectSettings document page confirmed that the verbose_stdout does this.
"Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc . . ."

This feature was working until #74405 merged. So, This may be a regression.

@gongpha gongpha requested a review from a team as a code owner July 29, 2024 15:05
@AThousandShips
Copy link
Member

AThousandShips commented Jul 29, 2024

Please open an issue to track and discuss this (things like if the documentation should be changed instead, if we want to print this)

@gongpha
Copy link
Contributor Author

gongpha commented Jul 29, 2024

This feature is useful when trying to track how many resources have been loaded at the moment. I don't see a reason why this feature should be removed anywhere. The only reason I thought was about the thread issue. However, the PR I mentioned has no intention of removing this feature.

But if I don't give enough information or anyone would like to track this, I will create an issue for this PR ASAP.

@RandomShaper
Copy link
Member

It seems I removed it while overhauling the former code. I don't remember if it was by mistake or purposedly. Regardless, I don't see harm in it being taken back if some found it useful and so are now missing it.

That said, I'm a bit unsure about how useful that is for your stated goal:

This feature is useful when trying to track how many resources have been loaded at the moment.

It'd be interesting to know what you need exactly, because it may warrant opening a proposal anyway, besides this PR.

@gongpha
Copy link
Contributor Author

gongpha commented Jul 29, 2024

I currently have no idea what to describe in a proposal right now. And I don't know why this had existed at first. Only I knew it helped me track if there were unwanted resources to be loaded at the time, like, Many resources in a main scene are trying to load at the same time and freezing the main thread and causing a stutter.

I believe there is a better solution and more usability. For example, a new profiler about resource allocation (likely related to godotengine/godot-proposals#8143). And it may boost efficiency in visualization e.g. treemap or something like that.

I also already asked about my brief problem in Rocket chat. But no one seems to be able to reply to me. Therefore this one already fits my needs. So, I hope this can be used "temporarily" before the real solution comes. At least, make it able to work for the next release that'll come in a few days.

@Summersay415
Copy link
Contributor

Really need this feature for debugging.
This can be added in 4.3, as it looks like regression?

@AThousandShips
Copy link
Member

It's a regression from 4.1 so it isn't critical

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Aug 27, 2024
@akien-mga
Copy link
Member

Needs rebase.

@gongpha gongpha force-pushed the bring-back-print-verbose-when-loading-resources branch from e16db9e to bfb5570 Compare August 27, 2024 20:38
@akien-mga akien-mga merged commit de7d4b6 into godotengine:master Aug 27, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@gongpha gongpha deleted the bring-back-print-verbose-when-loading-resources branch August 27, 2024 22:17
@RandomShaper RandomShaper added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 5, 2024
@RandomShaper
Copy link
Member

Cherry-pick for 4.3 included in #96606.

@akien-mga akien-mga removed the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants