godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.42k stars 21.26k forks source link

Godot4.4-dev4: Spaming loading messages if --verbose enabled. #99535

Open MikeSchulze opened 5 days ago

MikeSchulze commented 5 days ago

Tested versions

System information

all

Issue description

If verbose enabled, resource loading is now spamming loading messages. Image

Image

I use ResourceLoader.load(<script_name>, "GDScript", ResourceLoader.CACHE_MODE_REUSE) to preload and force reuse scripts to mimimize loading times in my test framework. So I use explicit CACHE_MODE_REUSE. But from the new log messages looks like the script is load again and again.

This spamming messages is filling my console when running my CI workflows now. Godot4.4-dev5 Image Godot4.3-stable Image

Steps to reproduce

Use the script and attach it to a scene to reproduce.

extends Node2D

func _ready() -> void:
    load_test()
    get_tree().quit()

func load_test() -> void:

    for i in 10:
        ResourceLoader.load("res://test/example_script.gd", "GDScript", ResourceLoader.CACHE_MODE_REUSE)
* run on Godot4.3-dev3

Loading resource: res://test/test.tscn Loading resource: res://test/test.gd Loading resource: res://test/example_script.gd --- Debugging process stopped ---



### Minimal reproduction project (MRP)

n/a
akien-mga commented 5 days ago

See https://github.com/godotengine/godot/pull/94920 - this brought back the behavior from 4.1 which some users were missing. Those prints hadn't been removed on purpose, so they were added back.

CC @RandomShaper

MikeSchulze commented 5 days ago

But I use the flag CACHE_MODE_REUSE where indicates the resource should only load if not already cached. So spamming the load message is not correct in this case.