Error Triage Hub (10)
Oxide Calling Hook Took Longer Than 200ms Warning Stutter
Synchronous C# plugin reflections and unindexed loops inside Oxide hooks stall every connected player.
Warning: >200 ms hook call | Fix: Profile & offload heavy hooks
Symptom Signature in Oxide Logs
Console floods with Calling hook OnEntitySpawned resulted in a 412ms pause or OnPlayerTick warnings. Micro-stutters occur whenever helicopters crash, raidable bases paste structures, or automated kits execute.
Root Cause: Reflection Dispatch & Blocking I/O
Oxide invokes plugin hooks via dynamic reflection and runs JSON datafile writes synchronously on the game thread unless async callbacks are used. Above 25 plugins, cumulative per-tick hook overhead consumes 6–14 ms of every 33.3 ms frame.
Measured Thresholds & Configuration
| Hook Category | Safe Latency | Stall Trigger |
|---|---|---|
| OnEntitySpawned | < 2 ms | > 150 ms (Raidable/Loot) |
| OnPlayerAttack | < 1 ms | > 40 ms (CombatLog DB) |
| OnServerSave | < 80 ms | > 900 ms (Sync JSON flush) |
| OnTick / Update | < 0.5 ms | > 15 ms cumulative |