diff --git a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs index c18fea3..9433c92 100644 --- a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs +++ b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSpawner.cs @@ -98,7 +98,7 @@ public class AsteroidSpawner { private const int UpdatesPerTick = 50;// update rate of the roids private ConcurrentQueue _pendingRemovals = new ConcurrentQueue(); - private const int REMOVAL_BATCH_SIZE = 50; + private const int REMOVAL_BATCH_SIZE = 10; private const double REMOVAL_BATCH_INTERVAL = 1.0; // seconds private DateTime _lastRemovalBatch = DateTime.MinValue; @@ -822,7 +822,7 @@ private void UpdateAsteroids(List zones) { } // Process removals in batches - const int REMOVAL_BATCH_SIZE = 50; + const int REMOVAL_BATCH_SIZE = 10; for (int i = 0; i < asteroidsToRemove.Count; i += REMOVAL_BATCH_SIZE) { var batch = asteroidsToRemove.Skip(i).Take(REMOVAL_BATCH_SIZE); foreach (var asteroid in batch) {