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 ~
This commit is contained in:
KHobbits 2011-11-29 16:06:39 +00:00
parent dd3b1e97b6
commit 414d6b79e9
2 changed files with 0 additions and 32 deletions

View File

@ -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

View File

@ -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