mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-10-06 03:27:50 +02:00
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:
parent
dd3b1e97b6
commit
414d6b79e9
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user