godotengine / godot

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

AssetLib stuck in "loading" for 60s #69854

Open svn133 opened 1 year ago

svn133 commented 1 year ago

Godot version

v4.0.beta8.official

System information

macOS 12.5.1 (21G83), MacBook Pro (2020, intel)

Issue description

When opening Godot editor on a new (or existing) project, switching to the AssetLib is somehow delaying the loading of the assets to install.

Looking with wireguard, I can see some initial communication taking place with godotengine.com, but nothing affecting the AssetLib screen. Then exactly 60 seconds after that initial communication, there is activity again, finally resulting in the list being displayed.

I have repeated this a few times, the 60s delay was happening every time. I guess this is some kind of periodic polling interval on that screen?

Anyhow: seems like, the first request is always failing, resulting in the user needing to wait for 60s until the list is requested again.

See screenshots for some impressions:

loading screen in AssetLib, new project 1-loading

wireshark: initial request at t=42, second request at t=102 2-wireshark

godotengine.org ip address lookup

3-godotengine-ip

Steps to reproduce

  1. open godot editor with a new project
  2. navigate to the AssetLib tab
  3. list is only displaying "Loading ..."
  4. wait for 60s
  5. list is now populated

Minimal reproduction project

create a new project

svn133 commented 1 year ago

Additional observation: the AssetLib is also extremely slow/unresponsive after that initial loading of th elist has finished. As soon as the list did finish loading, the CPU starts to spin up to unexpected levels, consuming 4-5 cores on my system (fan going wild on my machine). Every action triggered in the AssetLib tab takes very long time to complete, as a side-effect here, too: e.g., refining the search, clicking on some asset to open the detail popup.

See attached video for an impression. Something is way off in the AssetLib UI, or the processing of the asset meta-information.

video timestamps:

https://user-images.githubusercontent.com/114500633/206860808-2dcd13f2-6a04-4102-8afb-8bfd5e84ff0e.mp4

Calinou commented 1 year ago

Can you reproduce this on 3.5.1?

Also, it's worth trying to use a C++ profiler on a debug build of the engine (debug symbols are required, which aren't present in official builds).

svn133 commented 1 year ago

Can't reproduce with 3.5.1. - the assetlib is working fine on that version, i.e., all interaction is responding in a timely manner, only with short "web-typical" delays. Albeit the the CPU load is also going up to similar levels (3-4 cores), it is only doing so very briefly while changing search etc, not really noticable.

Regarding 4beta8: I'll check out and see if I get the debug-version running with the profiler and report back any findings.

svn133 commented 1 year ago

Ok, I was able to build and instrument: v4.0.beta.custom_build.e81c81732

On that, I was not was not able to reproduce, basically behaving similar to 3.5.1 tested earlier today: only a short CPU sprike, whenever something happened in the assetlib (I guess some meta-data processing?).

Just in case: the CPU spike seems to be happening in the http-response handler in the EditorAssetLibrary::_http_request_completed - but overall nothing looks super interesting in the profiling results.


Now the awkward part: just tried to reproduce with the official beta8 build again, the same one I had encountered the problem initially. In that version, it is now also working as expected, basically same behaviour as in the other versions.

Some wild guessing from gauging the few findings so far:

While observing the behaviour yesterday, I did not notice any other system- or internet-related problem on my machine, so I'd guess it was really some performance degration with the editor. Also the machine was not restarted since. But of course without being able to reproduce now, that is not so helpful I guess.

ARez2 commented 1 year ago

Can't reproduce on:

Basically for me it takes a few seconds (2-3) to load everything, but it's not at all close to 60 seconds. Can anyone else try it on the newest stable release?

tsiegleauq commented 1 year ago

Can Reproduce on:

Might be related to the Godot server or SSL issues. Feels like something is waiting for something to timeout...

Calinou commented 1 year ago

@svn133 @tsiegleauq Are you behind a proxy or dual-stack IPv4/IPv6 network?

raldone01 commented 6 months ago

I experience this on 4.2.1.

I have a dual-stack IPv4/IPv6 network. It does load eventually but is extremely unresponsive.