


This is an early development mod, not standalone software. Perf Profiler measures the game’s main Lua thread from inside the game and writes a ranking to log.txt every 20 seconds.
It can help identify whether performance issues come from scripts or the engine before removing mods.
In a real example from a 2,489-mod savegame, scripts were only ~4 ms of a ~19 ms frame. The expensive part was somewhere else, and the profiler showed that in 20 minutes instead of a week of trial and error.
Features
- Identifies which MOD costs the most milliseconds per frame.
- Identifies which FUNCTION inside it is responsible, including hooks, listeners, vehicle and placeable specializations, and game systems.
- Shows how much of the frame is Lua and how much is the engine, including render, physics, and loading.
- Records every SPIKE, defined as a frame over 40 ms, with its top contributors, marked as LUA or ENGINE.
- Measures hooks, including
Utils.appendedFunction,prependedFunction, andoverwrittenFunction. - Measures functions overwritten by specializations, listed by name.
- Measures
update()anddraw()of mod event listeners. - Measures
onUpdate,onUpdateTick,onPostUpdate, andonDrawof vehicle, placeable, and hand-tool specializations. - Measures the total update of each vehicle and placeable.
- Measures game systems, including environment, AI, traffic, water, and economy.
- Measures total Lua per frame to show the scripts versus engine split.
- Every entry shows “self” time, with no double counting, and “incl” time, including everything nested.
- Measuring costs about 0.5 ms per frame.
- It changes nothing in the savegame or gameplay. It only times functions and logs the results.
- Measures main-thread Lua. The engine side, including render and physics, appears as “engine” time and ENGINE spikes.
- Multiplayer is supported. Every player needs the same file if the host has it active.
- Full documentation,
README.md, with an explanation of every log line is inside the zip.
HOW TO USE
1. Put AAA_PerfProfiler.zip into your mods folder and activate it in the savegame.
Keep the name, because “AAA_” makes it load first, which it needs to catch other mods’ hooks.
2. Play normally. The first 20 seconds after loading are skipped.
3. Read the [PerfProfiler] lines in log.txt at Documents/My Games/FarmingSimulator2025/log.txt.
CONSOLE COMMANDS (~)ppReport – write a report nowppReset – reset statistics, to measure night, rain, and fieldwork separatelyppStart / ppStop – resume or pause measuringppSpike <ms> – spike threshold, default 40ppTop <n> – ranking length, default 35ppInterval <s> – report interval, default 20
Changelog
- 1.2.2.0





