CesiumGS / CesiumGS/cesium-unity
Task.Run() creates too much garbage
- Dominant language
- C#
- Stars
- 535
- Forks
- 132
- Avg merge
- 6h 45m
- Merged PRs (30d)
- 1
Description

In this screen shot you can see that calling System::Threading::Tasks::Task::Run(f); inside the UnityTaskProcessor::startTask function is creating too much garbage.
I switched to std::thread(f).detach() and see no problems.
Contributor guide
Research direction
Start at UnityTaskProcessor::startTask and reproduce the reported garbage allocation when it calls System::Threading::Tasks::Task::Run(f). Compare the profiler result with the std::thread(f).detach() observation, then verify that the task-processing behavior is preserved while the excessive garbage is eliminated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- 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