Performance overhaul sponsored by rockxz3, using his large server's data for reference to help with testing and tuning. Timing numbers below are based on this data set.
* PlayerMoveEvent performance boost (from 0.047ms to 0.015ms in testing, ~313% as fast): now more thrifty in determining whether player has actually moved between chunks before doing anything else; important since this event triggers extremely quickly * PlayerInteractEvent performance boost (from 0.068ms to 0.034ms in testing, ~200% as fast): now ignores left-clicks for interaction checks, since in CraftBukkit 1.4 left-clicks no longer open doors or activate buttons/levers/etc.; not as important as above, but still triggers quite often as people are digging or interacting with blocks * "/f list" command performance boost (from 234ms to 30ms in testing, ~780% as fast): code was getting information for all factions, narrowed it down to only getting info for displayed page range * "/f show" command performance boost (from 132ms to 28ms in testing, ~470% as fast): tweaked the ally & enemy listing code used
This commit is contained in:
@@ -65,7 +65,7 @@ public class SpoutMainListener implements Listener
|
||||
if (!sPlayer.isSpoutCraftEnabled() || (Conf.spoutTerritoryDisplaySize <= 0 && ! Conf.spoutTerritoryNoticeShow))
|
||||
return;
|
||||
|
||||
FLocation here = new FLocation(player);
|
||||
FLocation here = player.getLastStoodAt();
|
||||
Faction factionHere = Board.getFactionAt(here);
|
||||
|
||||
doOwnerList(player, sPlayer, here, factionHere);
|
||||
@@ -83,7 +83,7 @@ public class SpoutMainListener implements Listener
|
||||
|
||||
private void doLabels(FPlayer player, SpoutPlayer sPlayer, boolean notify)
|
||||
{
|
||||
FLocation here = new FLocation(player);
|
||||
FLocation here = player.getLastStoodAt();
|
||||
Faction factionHere = Board.getFactionAt(here);
|
||||
String tag = factionHere.getColorTo(player).toString() + factionHere.getTag();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user