LuckyScripts / Pulsar DispatchFIVEM FIELD GUIDE
Architecture & performance
Architecture & performance guide for LuckyScripts Pulsar Dispatch.
┌─────────────────────────────────────────────┐
│ SERVER │
│ ServerState (RAM Cache) │
│ ├── dispatches[] (active/solved/expired) │
│ ├── units{} (key: tostring(source)) │
│ └── panelOpenSources{} (batch optimization)│
│ │
│ Bridge Pattern: qbx.lua / qb.lua / esx.lua │
│ Periodic Tasks: cleanup + batch broadcast │
└─────────────────────────────────────────────┘
│ ▲
│ TriggerClientEvent │ TriggerServerEvent
▼ │
┌─────────────────────────────────────────────┐
│ CLIENT │
│ DispatchState (NUI message relay) │
│ ├── Alert Detectors (game events/polling) │
│ ├── NUI Callbacks (setWaypoint, etc.) │
│ └── Periodic Location Updates (5s) │
└─────────────────────────────────────────────┘
│ ▲
│ SendNUIMessage │ fetch POST
▼ │
┌─────────────────────────────────────────────┐
│ NUI (React 19) │
│ Index.tsx — Main Dispatch Panel │
│ ├── IncidentPanel — Active calls list │
│ ├── DispatchMap — Leaflet map │
│ │ ├── Unit Markers (batch remount) │
│ │ └── Alert Markers (stable popups) │
│ ├── UnitTable — Status board │
│ └── AlertsContainer — Pop-up alerts │
└─────────────────────────────────────────────┘Performance
| Metric | Value |
|---|---|
| Server State | RAM-only, no database queries |
| Unit Lookup | O(1) via table key |
| Batch Interval | 2 seconds |
| Batch Target | Only clients with open panels (panel-state-aware) |
| Location Update Interval | 5 seconds (client → server) |
| Stale Unit Cleanup | 2 minutes of inactivity |
| Dispatch Expiry | 5 minutes (auto-expired) |
| Max Historical Dispatches | 100 (older purged) |
| UI Bundle Size | ~415 KB JS + ~50 KB CSS (gzipped: ~123 KB + ~14 KB) |
| Build Time | ~2.7 seconds |
Event Frequency (50 online, 10 panels open)
| Event | Per 2 Seconds |
|---|---|
setUnits (batch) | 10 (only open panels) |
unitLocationUpdate | 10 (every 5s, staggered) |
| Total events/sec | ~7.5 |
LuckyScripts Pulsar Dispatch · Match configuration examples to your downloaded release.
Need a hand? Read the support guide ↗