summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-11-29 16:06:39 +0000
committerKHobbits <rob@khobbits.co.uk>2011-11-29 16:06:39 +0000
commit414d6b79e97ee41c94ad789a7c4aefd8bcbe5ea8 (patch)
tree7cd5d86470b2ae5111e0871277bea958f71d19f8
parentdd3b1e97b6182103e1f00fbcf252eb9a3139c241 (diff)
downloadEssentials-414d6b79e97ee41c94ad789a7c4aefd8bcbe5ea8.tar
Essentials-414d6b79e97ee41c94ad789a7c4aefd8bcbe5ea8.tar.gz
Essentials-414d6b79e97ee41c94ad789a7c4aefd8bcbe5ea8.tar.lz
Essentials-414d6b79e97ee41c94ad789a7c4aefd8bcbe5ea8.tar.xz
Essentials-414d6b79e97ee41c94ad789a7c4aefd8bcbe5ea8.zip
GC: Never force reclaiming RAM on user logout, it will be done automatically, when the time is right.
~ Should reduce player event lag a little bit ~
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java27
-rw-r--r--Essentials/src/config.yml5
2 files changed, 0 insertions, 32 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index 94a095df4..537a2de06 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -120,33 +120,6 @@ public class EssentialsPlayerListener extends PlayerListener
}
user.updateActivity(false);
user.dispose();
- if (!ess.getSettings().getReclaimSetting())
- {
- return;
- }
- final Thread thread = new Thread(new Runnable()
- {
- @Override
- public void run()
- {
- try
- {
- Thread.sleep(1000);
- Runtime rt = Runtime.getRuntime();
- double mem = rt.freeMemory();
- rt.runFinalization();
- rt.gc();
- mem = rt.freeMemory() - mem;
- mem /= 1024 * 1024;
- LOGGER.log(Level.INFO, _("freedMemory", mem));
- }
- catch (InterruptedException ex)
- {
- }
- }
- });
- thread.setPriority(Thread.MIN_PRIORITY);
- thread.start();
}
@Override
diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml
index b06fdd1d4..22cac25a9 100644
--- a/Essentials/src/config.yml
+++ b/Essentials/src/config.yml
@@ -68,11 +68,6 @@ item-spawn-blacklist:
# - essentials.give.item-[itemid]
permission-based-item-spawn: false
-# Whether or not to reclaim memory on player logout; this is technical, and should only be changed under special circumstances.
-# This generally increases server stability unless very specific runtime configurations are used.
-# HOWEVER, it is known to cause lag upon users logging OUT, so beware!
-reclaim-onlogout: false
-
# Mob limit on spawnmob
spawnmob-limit: 10