godotengine / godotengine/godot

Importing directory of images over-extends Godot's RAM usage

Open
#92,084 7 comments 0 reactions 0 assignees View on GitHub
bug confirmed needs testing topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.2.2

### System information

Windows 7

### Issue description

If you import a directory with lots of images, Godot will "helpfully" try and do it in parallel; makes sense for most game assets. However, the import process for even one large image file uses huge amounts of RAM, so when Godot tries to do multiple files in parallel, it can easily end up using far more RAM than the system has.

Godot does this self-induced lack of RAM well. It can crash Godot (not predictably reproduceable), crash Windows (not predictably reproduceable), and do weird stuff to the interface after the import is completed (below; not predictably reproduceable).

![godot is broken](https://github.com/godotengine/godot/assets/72134064/621cb8e8-ddb2-4b83-9b48-245b7a4e5176)

### Steps to reproduce

1) Create a new Project
2) Import a directory of large images. In my case I'm using about 22 Hubble Pictures
![Clipboard02](https://github.com/godotengine/godot/assets/72134064/3819d252-a14c-4b66-ac9b-5ed5a68e585f)

3) Godot Analyses the images, using 12GB or so of RAM.

If I double the number of images (copy/paste onto themselves), sure enough, Godot now uses 20GB of RAM, which is more than the 16GB on my system, so lots of paging and Bad Things (tm) can happen.

I expect if I had a directory filled solely with a couple dozen of the very largest of those images, Godot would do awful things to my RAM. Someone else can test that. :-)
You can get some Hubble pictures from here if you're struggling for large images to test against: https://hubblesite.org/images

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.