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

Editor takes a long time to load project with large amount of media files #94917

Closed
sanlor opened this issue Jul 29, 2024 · 11 comments · Fixed by #95678
Closed

Editor takes a long time to load project with large amount of media files #94917

sanlor opened this issue Jul 29, 2024 · 11 comments · Fixed by #95678

Comments

@sanlor
Copy link

sanlor commented Jul 29, 2024

Tested versions

v4.2.2.stable.official [15073af]

System information

Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce MX230 (NVIDIA; 31.0.15.3209) - Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 Threads)

Issue description

When opening an existing project with a lot of sprites, sound effects and music, the editor takes some time to open. It usually opens an empty project then it opens the actual project.
It doesn't seems to matter the size or type of the media file. If you have a lot of them, it is going to be slow.

Using the MRP, the delay is noticeable with 22000 image files.

Steps to reproduce

  • Open the MRP.
  • Take note of the time it took to open
  • Run the project and generate 22000 images.
  • Stop the project and wait for the files to be imported.
  • Reopen the MRP
  • Take note of the time it took to open

Minimal reproduction project (MRP)

Uploading delay.zip…

@AThousandShips
Copy link
Member

the delay is noticeable with 22000 image files.

That is an enormous number of images for any project IMO

Also you didn't upload the MRP properly, please try again and don't click away until it's finished uploading

@sanlor
Copy link
Author

sanlor commented Jul 29, 2024

I'm sorry, but for some reason I'm having a hard time uploading the MRP. I uploaded it to Filebin for the time being: https://filebin.net/uwqretaceha2xwxm

the delay is noticeable with 22000 image files.

That is an enormous number of images for any project IMO

I agree. I'm porting a RPG to Godot, with a lot of assets. I tried importing all of them and I had to wait about 5 minutes for it to open. I mean, waiting isn't all that bad, but the lack of a loading message had me questioning if the project was corrupted or not.

I had this problem with other projects, with few media files but a lot of scripts, custom resources, classes and scenes.
I'm opening the issue since i'm not sure if this behavior is expected or not.

@AThousandShips
Copy link
Member

Five minutes to import or for it to respond? There might be some interface issues to make it more responsive but processing that many files is always going to be slow

Can you try with rc1 there's been some improvement to some of the workflow

But your message makes it a bit more clear what you are asking, the original issue didn't make it clear that the issue was more the responsiveness of the editor, importing 22 thousand files is always going to be slow, no matter how efficient we make it (even if a file takes just a few milliseconds to load it still takes several minutes)

@sanlor
Copy link
Author

sanlor commented Jul 29, 2024

Five minutes to import or for it to respond? There might be some interface issues to make it more responsive but processing that many files is always going to be slow

About 5 minutes for the editor to respond.
Importing the files also takes a long time, but that is expected. The issue is when the files are already imported, you close and reopen the project. When the project opens, it looks empty, without any message or loading bars. After some time, the actual project opens.

Please note that the 22000 images files is just an example to simulate the behavior observed. A project can have 1000 sound files, 2000 textures / sprites and this behavior will probably occur.

I will check the MRP using the rc1 and see if there are any changes on the performance.

@sanlor
Copy link
Author

sanlor commented Jul 29, 2024

I will check the MRP using the rc1 and see if there are any changes on the performance.

It seems that it still takes a while to load using the rc1, but now its possible to see a loading screen (which is a big improvement!)

image

took 67959 msecs to start.
There are 20001 files.

@Calinou
Copy link
Member

Calinou commented Jul 30, 2024

Can you test #93064 locally? It should improve project loading speeds in projects with lots of files. (Note that CI-provided builds are not fully optimized, so official binaries featuring would be faster.)

@sanlor
Copy link
Author

sanlor commented Jul 31, 2024

Can you test #93064 locally? It should improve project loading speeds in projects with lots of files. (Note that CI-provided builds are not fully optimized, so official binaries featuring would be faster.)

Thanks, I will give it a try later.

Just a quick update, I tried the MRP on a more powerful device and the loading time is still noticeable, but a lot faster. Both PCs are using SSDs.

Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated Radeon (TM) RX 480 Graphics (Advanced Micro Devices, Inc.; 31.0.12042.4) - AMD Ryzen 7 5700G with Radeon Graphics (16 Threads)

took 40589 msecs to start. There are 44001 files.

@Jordyfel
Copy link
Contributor

#47053 (comment)

Try setting a windows defender exception for the project folder, it made a huge difference for me

@sanlor
Copy link
Author

sanlor commented Jul 31, 2024

So, I was able to compile the #93064 , both on Windows and Linux (running under WSL on the same PC):

On Windows was still very slow, but on Linux was surprisingly fast on 4.2, 4.3 RC1 and the custom build. Not sure why.
Windows Defender was disabled for all tests below.

Godot v4.3.rc (6eddde1) - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce MX230 (NVIDIA; 31.0.15.3209) - Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 Threads)
v4.3.rc.custom_build [6eddde1]

took 57445 msecs to start.
There are 24000 files.

Godot v4.3.rc (6eddde1) - Kali GNU/Linux Rolling 2024.2 - Vulkan (Mobile) - (software emulation on CPU) llvmpipe (LLVM 17.0.6, 256 bits) - Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 Threads)
v4.3.rc.custom_build [6eddde1]

took 16782 msecs to start.
There are 24000 files.

Godot v4.3.rc1 - Kali GNU/Linux Rolling 2024.2 - Vulkan (Mobile) - (software emulation on CPU) llvmpipe (LLVM 17.0.6, 256 bits) - Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 Threads)
v4.3.rc1.official [e343dbb]

took 20992 msecs to start.
There are 22001 files.

Godot v4.2.2.stable - Kali GNU/Linux Rolling 2024.2 - Vulkan (Mobile) - (software emulation on CPU) llvmpipe (LLVM 17.0.6, 256 bits) - Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 Threads)
v4.2.2.stable.official [15073af]

took 17557 msecs to start.
There are 22001 files.

@Saul2022
Copy link

Saul2022 commented Aug 16, 2024

. Not sure why. Windows Defender was disabled for all tests below.

You checked on task manage to see if there was something that was running on windows that bottleneck your loading times?

Godot v4.3.rc1 - Kali GNU/Linux Rolling 2024.2 - Vulkan (Mobile)

 took 20992 msecs to start.
> There are 22001 files.

Godot v4.2.2.stable - Kali GNU/Linux Rolling 2024.2 - Vulkan (Mobile)

took 17557 msecs to start.
There are 22001 files.

Interesting though why the custom build has more files in it that the other and it weird there was not much substantial improvement aside from better feedback on loading. The most surprising is why is 4.3 rc 1 slower than 4.2.2 stable in linux, might be the scanning stuff or something else? You can check it too on windows if it happens the same?

@Hilderin
Copy link
Contributor

@sanlor can you try with your project with a build from this PR: #95678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants