godotengine / godotengine/godot
Dragging a meshlibrary file hangs the editor for several seconds.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproductible in v4.3.rc3.mono.official [03afb92ef]
- Reproductible in v4.2.2.stable.mono.official [15073afe3]
### System information
Windows 10 - Vulkan (forward+) - dedicated
### Issue description
Trying to drag a meshlibrary file into a gridmap file makes the editor hang for several seconds depending on the size of the file.
It also repeats the hang everytime you mouseover the slot dropbox.
If the file is small 30Mb~ it is manageble. Just feels clunky.
https://github.com/user-attachments/assets/d725e86c-c1be-43de-aaf9-16fdbd4f2425
Big it becomes unusable if the file is bigger than around 80MB
https://github.com/user-attachments/assets/62941182-9196-469e-b4c5-8db5628b9be4
---
**I'm also not sure if the mesh library size is a bug itself.**
A mesh library of kenny platformer kit (**142 files** totalling **2 MB glb files**) --> **Meshlibrary of 9 MB**
But then using KayKit halloween bits (**63 files** totalling **1.47 MB**) ----> **Meshlibrary of 88 MB**
Both saved as .meshlib format.
It feels like a bug but it might also be the mesh library is horribly optimized for specific cases.
From the size reduction of **130 MB to 5 MB with a simple .zip** with the MRP, the Meshlibrary itself doesn't seem to use much
compression to it, even using .meshlib or .res files.
### Steps to reproduce
From the MRP:
- Open world.tscn
- Drag & drop "mesh_really_bad.meshlib"
Result: Editor hands for several seconds
- Drag & Drop "mesh_bad.meshlib"
Result: Lags and hands for a few miliseconds each time mouse over gridmap slot while holding file.
From a blank project:
- Save a scene file with lots of glb scenes children.
- Select export as meshlibrary.
- Add a gridmap to a new scene
- Try Drag and drop a meshlibrary file into the gridmap slot ( lags if file is 30MB, unusable at 80MB)
### Minimal reproduction project (MRP)
Minimal project.
[bug-meshlibrary-drag.zip](https://github.com/user-attachments/files/16596839/bug-meshlibrary-drag.zip)
Contributor guide
Research direction
Start with the attached minimal reproduction project: open world.tscn, then drag mesh_really_bad.meshlib and mesh_bad.meshlib into the GridMap slot. Compare the hangs while dragging and mousing over the slot for the reported 30 MB and 80 MB cases. Done means these mesh libraries no longer cause multi-second editor hangs or repeated lag during hover.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev, performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100