Performance & Profiling
FiniAC is built for near-zero overhead: on the server it averages about 0.5 ms per frame at 100 players, and about 0.1 ms on the client. When you are chasing frame drops or hitches on your server, FiniAC gives you the tooling to prove where the time is going — instead of guessing.
Profiler Scopes
FiniAC's client and server code is instrumented with profiler scopes. Every major subsystem — detection modules, tick handlers, event processing — runs inside its own named scope, so a profiler capture shows a detailed breakdown of FiniAC's work rather than one opaque block of resource time.
This means you can narrow an issue down precisely:
- Is it FiniAC at all? The capture shows FiniAC's total frame time next to every other resource.
- If it is, which part? The named scopes show exactly which subsystem is consuming the time, which makes reports actionable for our team.
Recording a Profile
FiniAC works with the profiler built into FiveM and RedM — no extra tooling required.
Client
- Open the console with
F8 - Start a capture:
profiler record 500(records the next 500 frames) - Reproduce the issue (play normally, trigger the laggy situation)
- View the results:
profiler view
Server
- In the server console (or txAdmin console), run
profiler record 500 - Wait for the capture to finish
- Run
profiler viewand open the URL it prints, or save the capture withprofiler saveJSON finiac-profile.json
Viewing saved captures
A capture saved with profiler saveJSON can be opened in Chrome's tracing UI (chrome://tracing) or ui.perfetto.dev. This is also the best format to share when reporting an issue.
Reading the Results
In the trace view, frames run left to right and each resource's work appears as nested blocks — the wider the block, the more time it took.
- Find the frames that are visibly longer than the rest — those are your hitches.
- Expand them and look at which resource dominates the frame.
- Inside FiniAC's block, the named scopes show which subsystem the time was spent in. A healthy capture shows FiniAC's total well under a millisecond on most frames.
About resmon
resmon is a quick way to glance at resource CPU time, but it adds measurement overhead of its own and inflates the numbers of every resource while it is open — including FiniAC. Use it for rough comparisons only; trust the profiler for real numbers.
Event-Driven Cost
Most of FiniAC's server-side work is event-driven: its cost scales with the volume of events your resources produce, not with time. If FiniAC's event processing scopes show elevated time, the usual cause is a resource spamming events.
Use Logging to find the culprit — the event statistics CSV (events.stats.csv) shows exactly which events fire most often, so you can pinpoint noisy resources and fix them at the source.
Reporting a Performance Issue
If a capture shows FiniAC taking more time than expected, we want to know. To make the report actionable, include:
- The saved capture (
profiler saveJSON finiac-profile.json) - Whether it is client- or server-side, and the player count at the time
- What was happening in-game when it occurred (if it's situational)
Send it to us on Discord — with a capture and the scope names visible, issues that would take days of back-and-forth are usually diagnosed in minutes.