mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
This system is only actually touched by the game a tiny handful of times during a round, yet it was the 4th top frametime consumer, because it was querrying every potentially networkable entity in existence on the maybe off-chance it was interacted with by a remote signaller. On a typical station, this is tens of thousands of entities, with strong linear scaling as the round time increases due to creation of new entities. I have tested this PR to verify that device links and signals still work, except now with 99.99% less frametime cost. <details><summary><h1>Media</h1></summary> <p>  </p> </details> 🆑 - tweak: Made significant performance improvements to device network systems. Co-authored-by: Eris <eris@erisws.com>
16 lines
503 B
C#
16 lines
503 B
C#
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.DeviceLinking;
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed partial class ActiveDeviceLinkSinkComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Counts the amount of times a sink has been invoked for severing the link if this counter gets to high
|
|
/// The counter is counted down by one every tick if it's higher than 0
|
|
/// This is for preventing infinite loops
|
|
/// </summary>
|
|
[DataField]
|
|
public int InvokeCounter;
|
|
}
|