summaryrefslogtreecommitdiffstats
path: root/src/main/resources
diff options
context:
space:
mode:
authorMike Primm <mike@primmhome.com>2012-12-10 09:38:26 -0600
committerTravis Watkins <amaranth@ubuntu.com>2012-12-29 16:50:05 -0600
commitfb0eed177a8fd6bed39571003fbc6852478c9b07 (patch)
tree7a8b746c194320ff712484b39f3ef84cc03a68f9 /src/main/resources
parent538de63a033431352f5060fb5c72356c6c0d0a48 (diff)
downloadcraftbukkit-fb0eed177a8fd6bed39571003fbc6852478c9b07.tar
craftbukkit-fb0eed177a8fd6bed39571003fbc6852478c9b07.tar.gz
craftbukkit-fb0eed177a8fd6bed39571003fbc6852478c9b07.tar.lz
craftbukkit-fb0eed177a8fd6bed39571003fbc6852478c9b07.tar.xz
craftbukkit-fb0eed177a8fd6bed39571003fbc6852478c9b07.zip
[Bleeding] Implement periodic chunk garbage collector
This adds two settings to bukkit.yml, allowing activation and control of two chunk garbage collection triggering conditions: chunk-gc/period-in-ticks controls a periodic GC, run once every N ticks (default is 600); chunk-gc/load-threshold causes the GC to run once after every N calls to loadChunk() on a given world (this call is an API call used by plugins, and is distinct from the path taken for routine player movement-based loading). In both cases, setting to zero will disable the given GC scheduling strategy. In either case, the act of doing the GC is simply one of scanning the loaded chunks, seeing which are NOT being used by one or more players (due to view-distance) and which are not already queued for unload, and queueing them for a normal unload. Ultimately, the unload is then processed the same as if the chunk were unloaded due to leaving the view-distance range of all players, so the impact on plugins should be no different (and strategies such as handling the ChunkUnloadEvent in order to prevent unload will still work). The initial interval for the periodic GC is randomized on a per-world basis, in order to avoid all world being GCed at the same time - minimizing potential lag spikes.
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/configurations/bukkit.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index e4d6d96f..61a95e33 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -30,6 +30,9 @@ spawn-limits:
animals: 15
water-animals: 5
ambient: 15
+chunk-gc:
+ period-in-ticks: 600
+ load-threshold: 0
ticks-per:
animal-spawns: 400
monster-spawns: 1