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

Improve asset importing and file renaming speeds for projects with a lot of files #280

Open
MightyPrinny opened this issue Dec 3, 2019 · 5 comments

Comments

@MightyPrinny
Copy link

MightyPrinny commented Dec 3, 2019

Describe the project you are working on:
We have a huge community made game maker project with assets from over 50 people + a lot of assets already in the base game, I wanted to see if we could move our engine to Godot for future games.

Describe the problem or limitation you are having in your project:
I added a lot of assets to a new project to see how Godot would handle it, I took the assets from our game maker project and since game maker stores every animation frame individually I ended up with thousands of files, importing everything took longer than loading the project in game maker(that takes very long too).

Godot just couldn't handle that much, now adding new assets and renaming files takes several minutes, between audio and image files I had 52960 files in total counting the .import files.

Describe how this feature / enhancement will help you overcome this problem or limitation:
I could move the project over to Godot for future games if this wasn't an issue, I know that if we were to do that we would have much less files since sprites would be in sprite sheets, but I didn't include any of the the background files from our project and the project isn't finished, there's a lot to be done, so I'm not sure if it the engine could handle a project of that size even with sprite sheets.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
I don't think it's necessary since it's about optimization.

Describe implementation detail for your proposal (in code), if possible:
Sorry, I can't help much with this.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
Definitely not.

Is there a reason why this should be core and not an add-on in the asset library?:
It's an optimization.

@Calinou
Copy link
Member

Calinou commented Dec 13, 2019

I wonder if hiding the editor progress dialog would speed up importing, as the current implementation is known to slow down tasks significantly when it has to follow a large amount of steps. See also godotengine/godot#30850.

If this is the case, we can provide an editor setting to hide the progress dialog. This wouldn't be ideal, but it'd be better than nothing. Profiling the editor progress dialog would be welcome too 🙂

@MightyPrinny
Copy link
Author

MightyPrinny commented Jan 31, 2020

I wasn't talking about that(not completely that might help with improving the time it takes to rename a file), there are no progress bars when the editor scans the file system, other programs can detect file changes faster than Godot, my problem was mainly that when you add new assets to a project with a lot of files it takes a while before Godot realizes there's a new file and imports it.

@AaronRecord
Copy link

AaronRecord commented Jun 16, 2021

I wonder if it'd make sense to store all the import settings in one .import file in the project root that would be loaded when the project loads. This could allow resources with the same import settings to not have their import settings be duplicated. An idea for how it could be implemented is storing it as a dictionary where the resource path is the key and the value is a reference to its import settings (multiple resources could point to the same import settings). The disadvantage of this it might be harder to export a group of assets with their export settings, to share/publish them etc., maybe there should be a way to do this (like .unitypackage) (or maybe there already is a way to do this with .pck files that I'm not familiar with).

@Calinou
Copy link
Member

Calinou commented May 15, 2022

Resource importing is now multithreaded in master (since 4.0alpha1 at least). I'm not sure if much can be done to improve import speeds in 3.x, other than using more aggressive compiler optimizations.

@Saul2022
Copy link

It might be good to test this stuff now that there wrre multiple improvements on the past years along with some upcoming prs like this godotengine/godot#95678 (comment) or godotengine/godot#93064 (comment)

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

No branches or pull requests

4 participants