godotengine / godot

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

The project import file browser window is slow, becomes unusable after some time (Wayland) #74434

Open davthedev opened 1 year ago

davthedev commented 1 year ago

Godot version

4.0-stable x86_64

System information

Ubuntu 22.04, Intel Iris Plus Graphics G7, Wayland

Issue description

The project import file browser is very slow after browsing in a couple directories.

Something must be hardworking in the background. The UI slows down significantly.

For example, selection background appears a few seconds after I click to select a file. Hover effects on the different buttons also appears with a few seconds' delay although it should be immediate. When double-clicking to select a directory, the window is refreshed with the new browsing location contents with a few seconds' delay.

The delay increases over time. At some point, the whole thing becomes unusable.

Steps to reproduce

From the project selection window: click Import then Browse.

Click on the directories icons and notice the UI starting to slow down about a few seconds.

Minimal reproduction project

The bug happens in the project selection window. At this point, no project is loaded in the editor yet.

Calinou commented 1 year ago

How many files and folders does the directory you're currently viewing have? Does it have a lot of files that cause thumbnails to be generated?

davthedev commented 1 year ago

There are about 15-20 directories visible when I start browsing. The problem starts in this situation after a few seconds. Due to the file type filter, I do not see any other files at that point. There are about 30 of them.

One interesting element I just noted : it happens under Wayland only. Under a Xorg session there is no issue.

Riteo commented 1 year ago

Under a Xorg session there is no issue.

That's because you're actually running Godot through XWayland, a compatibility layer.

I'm putting this issue in #78581. See it for more information.

quinnyo commented 1 year ago

I can't reproduce this on sway, Arch Linux - v4.0.3.stable.arch_linux - Vulkan API 1.3.246 - AMD Radeon RX 5600 XT (RADV NAVI10) (tried OpenGL as well)

The best I could do was a brief delay (a couple of frames) when I entered /usr/bin (~6000 files) with 'all files' set. I tried list and tile mode, biggest/smallest thumbnail size, show hidden files, etc.

Do you have a project autoscan directory set? (filesystem/directories/autoscan_project_path)

geowarin commented 1 year ago

I have the same issue with Gnome (Wayland) on Fedora. Interestingly, this only happens when with the file picker used to load a library from the "Manage Animation..." window.

image

I have no problem with the project list window nor with Scene > Open Scene action :thinking:

Calinou commented 1 year ago

Interestingly, this only happens when with the file picker used to load a library from the "Manage Animation..." window.

This likely happens because you have multiple dialogs open at once in this case. You can confirm this by trying to change an editor setting that uses a file dialog (e.g. Main Font/Code Font path).

geowarin commented 1 year ago

@Calinou Nope. Main Font dialog works fine...

zerujio commented 1 year ago

I have the same issue with Gnome (Wayland) on Fedora. Interestingly, this only happens when with the file picker used to load a library from the "Manage Animation..." window.

I have this same problem with this same specific dialog. Running Wayland on Pop_OS.