]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Optimizations from server profile (#38290)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Sat, 26 Jul 2025 09:44:34 +0000 (11:44 +0200)
committerGitHub <noreply@github.com>
Sat, 26 Jul 2025 09:44:34 +0000 (11:44 +0200)
commit444180c20dd4f758e2a9311a7e0ba1a65402a9fe
treebcd3084c14c486dda44666c351be4b67ec2d3df6
parentd0c104e4b095b834aa6344f336a45023f66a8e41
Optimizations from server profile (#38290)

* Properly cache regexes in chat sanitization/accents

Wow I wonder if `new Regex()` has a cost to it *looks at server profile*.

* Avoid lag caused by Tippy command completions

CompletionHelper.PrototypeIDs explicitly says *not* to use it with EntityPrototype. Unsurprisingly, reporting a completion result for every entity prototype in the game is a *bad idea*.

* Add active count metrics to some high-load systems

Mover & NPCs

I suspect the thing that caused the Leviathan round to shit itself on performance is NPC spam in space or something. So let's verify that.

* Enable parallel processing on pow3r again

Originally disabled due to a theory of it causing bugs, it was re-enabled on Vulture, and I'm not aware of it having caused any issues there.

* Replace hashset with bitflags for AtmosMonitor alert types.

Allocating these hashsets was like 20% of the CPU of atmos, somehow.

* Cache HashSet used for space movement collider checks

Turns out this was a ton of server allocations. Huh.
14 files changed:
Content.Server/Atmos/Monitor/Components/AtmosAlarmableComponent.cs
Content.Server/Atmos/Monitor/Components/AtmosMonitorComponent.cs
Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs
Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs
Content.Server/Chat/Managers/ChatSanitizationManager.cs
Content.Server/NPC/Systems/NPCSteeringSystem.cs
Content.Server/NPC/Systems/NPCSystem.cs
Content.Server/Physics/Controllers/MoverController.cs
Content.Server/Speech/EntitySystems/ReplacementAccentSystem.cs
Content.Server/Tips/TipsSystem.cs
Content.Shared/Atmos/Monitor/AtmosAlarmThreshold.cs
Content.Shared/CCVar/CCVars.cs
Content.Shared/Movement/Systems/SharedMoverController.cs
Resources/ConfigPresets/WizardsDen/vulture.toml