[Performance] Reduce UpdateWho S2S Chatter to World (#4792)

* [Performance] Reduce UpdateWho S2S chatter

* Add rule to change this dynamically
This commit is contained in:
Chris Miles 2025-03-29 14:56:32 -05:00 committed by GitHub
parent 235e59a2d8
commit 30fddcc5a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

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

View File

@ -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();
}
}
};