Skip to content

Commit 9dbb718

Browse files
committed
Spread update processing across multiple ticks (avoid lag spikes with big populations)
1 parent 48153c1 commit 9dbb718

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/dynmap/mobs/DynmapMobsPlugin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ public void run() {
235235
}
236236
while (mobsToDo == null) {
237237
if (worldsToDo.isEmpty()) {
238-
/* Now, review old map - anything left is gone */
238+
// Now, review old map - anything left is gone
239239
for(Marker oldm : mobicons.values()) {
240240
oldm.deleteMarker();
241241
}
242-
/* And replace with new map */
242+
// And replace with new map
243243
mobicons = newmap;
244244
// Schedule next run
245245
getServer().getScheduler().scheduleSyncDelayedTask(DynmapMobsPlugin.this, new MobUpdate(), updperiod);
@@ -454,11 +454,11 @@ public void run() {
454454
}
455455
while (vehiclesToDo == null) {
456456
if (worldsToDo.isEmpty()) {
457-
/* Now, review old map - anything left is gone */
457+
// Now, review old map - anything left is gone
458458
for(Marker oldm : vehicleicons.values()) {
459459
oldm.deleteMarker();
460460
}
461-
/* And replace with new map */
461+
// And replace with new map
462462
vehicleicons = newmap;
463463
// Schedule next run
464464
getServer().getScheduler().scheduleSyncDelayedTask(DynmapMobsPlugin.this, new VehicleUpdate(), vupdperiod);

0 commit comments

Comments
 (0)