Improve update_mesh_previous_global_transforms() performance
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
* Using try_insert for every entity is expensive. We should have a system to first add PreviousGlobalTransform to entities missing it, and then a second system to update the value. Or something like that.
* When using the meshlet feature, but no motion vector prepass, Mesh entities (not MeshletMesh) unnecessarily get a PreviousGlobalTransform. Not really worth fixing imo, as you probably want to use TAA with meshlets anyways, but I'm making a note of it here.
Contributor guide
Research direction
Locate update_mesh_previous_global_transforms() and inspect how it uses try_insert for each entity. Compare the proposed separate systems for adding missing PreviousGlobalTransform components and updating existing values, while reviewing the meshlet and motion-vector-prepass condition described in the issue. Done means the function's behavior is preserved and its performance is improved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100