Consider removing `RetainedViewEntity`
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
`RetainedViewEntity` is used as a stable identifier across frames
https://github.com/bevyengine/bevy/blob/25368b78ce5e9b15dc770cdf2af4595602cc8a7b/crates/bevy_render/src/view/mod.rs#L268-L278
Since https://github.com/bevyengine/bevy/issues/18722 is fixed, the render entity across frames should be stable now. We can try replacing `RetainedViewEntity` with `Entity` and use faster `EntityHasher`.
Also `ViewKeyCache` may be converted from a Hashmap to a Component.
Contributor guide
Research direction
Start in crates/bevy_render/src/view/mod.rs at RetainedViewEntity and trace its usages, then inspect ViewKeyCache and EntityHasher. Compare the assumptions behind issue #18722 with current render behavior; done means safely replacing the retained identifier and evaluating the cache conversion without breaking cross-frame view tracking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100