godotengine / godotengine/godot
GLTFDocument.append_from_scene executed on non-ui thread cost tool much time compared to on ui thread.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in Godot v4.0.4.stable
### System information
Mac & Android & iOS - Godot v4.0.4.stable
### Issue description
try to execute GLTFDocument.append_from_file on ui thread and non-ui thread respectively, the time cost on non-ui thread is much higher than on ui thread. for example, in the minimal reproduction project, append on ui thread time cost: 3436ms,
but append on other thread time cost: 117287ms
Hope to see your replay as soon as possible! Thanks so much!
### Steps to reproduce
run the MRP Main.tscn to check result
### Minimal reproduction project (MRP)
[MinimalProject.zip](https://github.com/user-attachments/files/18088789/MinimalProject.zip)
Contributor guide
Research direction
Start by running the attached MinimalProject.zip and Main.tscn, then compare GLTFDocument.append_from_file on the UI and other threads using the reported timings. Trace the relevant GLTFDocument entry points, including append_from_scene from the issue title, and verify that the non-UI performance discrepancy is explained and addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100