You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solari: Prevent world cache cells from keeping each other alive infinitely (#21904)
# Objective
- Prevent world cache cells from querying each other and keeping each
other alive infinitely
- Now when you leave an area of your game, you're no longer paying
performance cost for the out-of-view cells.
- Also fix a long-standing off-by-1 bug in the world cache compaction
code
## Solution
- Instead of always resetting cell lifetimes to the max lifetime during
a cell query, for world cache update, we now set it to the max of the
current cell lifetime and it's existing lifetime (max prevents a
lower-lifetime cell overwriting a higher-lifetime cell).
- Credit to IsaacSM and @NthTensor for the idea!
## Testing
Video showing the current number of live world cache cells, before and
after this PR.
https://github.com/user-attachments/assets/7639c62c-9bdb-41d7-aebb-b2494c03c042
---------
Co-authored-by: Alice Cecile <[email protected]>
0 commit comments