godotengine / godotengine/godot
Massive performance drop when modifying a tile from a disabled tilemap
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Using version 4.2.1 stable mono [b09f793f5]
### System information
Windows 11 - Godot v.4.2.1 stable mono
### Issue description
If you modify (specifically in my case delete) a tile from a disabled layer in a tilemap, you will see a massive drop in performance due to GPU computing.
I was doing this specifically to hide a layer while in debug mode. I guess I'll try to shift the layer behind other layers for now, but this solution will not work for people who might not be using multiple layers and just wished to make a tilemap temporarily invisible while still needing to modify it.
### Steps to reproduce
1) Create a tilemap, fill it with tiles 1000 x 1000
2) Disable the layer
3) Start removing tiles on the layer
In the Minimal Reproduction Project, you don't have to do anything, the code is already set up to automatically create the tilemap and starts a repeating task that deletes a tile every 2 seconds. Just boot the demo and check the profiler.
### Minimal reproduction project (MRP)
[Godot_MRP.zip](https://github.com/godotengine/godot/files/14719245/Godot_MRP.zip)
Contributor guide
Research direction
Reproduce the issue with the linked Minimal Reproduction Project: boot it, inspect the profiler, and observe tile deletion on the disabled layer. Compare the profiler behavior while modifying the 1000 × 1000 tilemap and determine what work is triggered; done means the documented performance drop is addressed without breaking tile modification or layer disabling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- 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