PONEGLYPHSTUDIOS

Reference

Performance

Real resmon figures (~0.03 ms in vehicle, ~0.00 ms on foot), why it is this cheap, and how to measure it yourself.

PSTUDIOS-HUD is built to stay invisible to your server's frame budget. It runs a single thread, only sends data that actually changed, and reuses the same message table every tick. These are the figures you should expect to see in resmon.

Expected resmon figures

  • On foot / parked: ~0.00 ms.
  • Driving: ~0.03 ms (measured).

Why it is this cheap

Single dynamic-wait thread

The resource runs one thread with a dynamic wait: 250 ms when you are on foot and Config.HudRefresh while you are in a vehicle. On foot the loop barely runs, which is why the cost collapses to ~0.00 ms. The default Config.HudRefresh is 75 ms, which is smooth and very cheap; lowering it makes the HUD snappier but heavier. You can change it in Configuration (config.lua).

Per-field dirty-check

On every tick the HUD compares each value against the last one it sent and only includes the fields that actually changed, all in a single SendNUIMessage. If nothing changed, nothing crosses into the NUI. This avoids redrawing the whole cluster on every frame.

Reused buffer and gated natives

The message table is reused across ticks, so there are zero per-tick allocations. Heavy natives such as street/zone lookups and framework status (hunger/thirst/stress) are time- and movement-gated, so they do not run on every tick when nothing has changed.

How to measure with resmon

  1. Open the F8 console.
  2. Run resmon 1 and find the pstudios-hud entry.
  3. Watch it on foot, parked, and while driving through a busy area.
resmon 1
Run in the F8 console, then locate pstudios-hud in the list.
💡resmon averages over a window, so drive around for a moment to see the true in-vehicle figure rather than the instant the thread woke up.