godotengine / godotengine/godot
Profiler not displaying the right process time and from where it's coming from.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in : 4.5.1.stable,4.5.stable,4.4.stable
### System information
Windows 11 - Godot v4.5.1.stable - Vulkan(Forward+) - dedicated Intel ARC A580
### Issue description
If a shader is meant to be edited by code, but the code either fails to edit it correctly or tries to modify non-existent variables in the shader or material, the shader/material won’t know how to handle those operations. This can cause significant lag when there are many objects of the same type in the game.
The Profiler does not show which function the lag is coming from, but the Monitor correctly displays the process time.
### Steps to reproduce
Step 1 - Make a shader or a material
Step 2 - Make a script
Step 3 - Parse a variable that does not exist to said material or shader
### Minimal reproduction project (MRP)
[testing.zip](https://github.com/user-attachments/files/23498994/testing.zip)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached testing.zip reproduction and compare the Profiler's process-time display with the Monitor while reproducing the invalid shader/material variable access. No source file, test, or entry point is named; trace the profiler path for this workload, then verify that it identifies the lagging function and agrees with the Monitor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100