mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Performance] Reduce UpdateWho S2S Chatter to World (#4792)
* [Performance] Reduce UpdateWho S2S chatter * Add rule to change this dynamically
This commit is contained in:
parent
235e59a2d8
commit
30fddcc5a0
@ -379,6 +379,7 @@ RULE_BOOL(Zone, StateSaveEntityVariables, true, "Set to true if you want buffs t
|
||||
RULE_BOOL(Zone, StateSaveBuffs, true, "Set to true if you want buffs to be saved on shutdown")
|
||||
RULE_INT(Zone, StateSaveClearDays, 7, "Clears state save data older than this many days")
|
||||
RULE_BOOL(Zone, StateSavingOnShutdown, true, "Set to true if you want zones to save state on shutdown (npcs, corpses, loot, entity variables, buffs etc.)")
|
||||
RULE_INT(Zone, UpdateWhoTimer, 120, "Seconds between updates to /who list, CLE stale timer")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Map)
|
||||
|
||||
@ -500,6 +500,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect
|
||||
Timer UpdateWhoTimer(RuleI(Zone, UpdateWhoTimer) * 1000); // updates who list every 2 minutes
|
||||
|
||||
#ifdef EQPROFILE
|
||||
#ifdef PROFILE_DUMP_TIME
|
||||
Timer profile_dump_timer(PROFILE_DUMP_TIME * 1000);
|
||||
@ -647,7 +649,10 @@ int main(int argc, char **argv)
|
||||
InterserverTimer.Start();
|
||||
database.ping();
|
||||
content_db.ping();
|
||||
entity_list.UpdateWho();
|
||||
if (UpdateWhoTimer.Check()) {
|
||||
UpdateWhoTimer.SetTimer(RuleI(Zone, UpdateWhoTimer) * 1000); // in-case it was changed
|
||||
entity_list.UpdateWho();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user