Skip to content

Commit

Permalink
Performance: Only recycle active containers
Browse files Browse the repository at this point in the history
  • Loading branch information
FallenCharlotte committed Oct 7, 2023
1 parent 1bf6a1f commit 79227ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ public override void RefreshPool(bool force)
{
if (UIMode.AnimationMode)
{
foreach (var obj in UnsortedObjects)
foreach (var obj in LoadedContainers.Values.ToList())
{
RecycleContainer(obj);
RecycleContainer(obj.ObjectData);
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ private void OnTimeChanged()
private void RefreshWalls()
{
var time = AudioTimeSyncController.CurrentJsonTime;
foreach (var obj in UnsortedObjects)
foreach (var obj in LoadedContainers.Values.ToList())
{
RecycleContainer(obj);
RecycleContainer(obj.ObjectData);
}
GetIndexes(
time,
Expand Down

0 comments on commit 79227ea

Please sign in to comment.