Verse Insights shows how much time the Verse code in your experience takes to run. Use it to find the Verse function responsible for a slowdown, then confirm that your fix worked.
Verse Insights is part of Timing Insights. When you capture with Server as the target, your Verse functions appear as timing events. This page covers only what is specific to Verse. For the panels not covered here, see Timing Insights in UEFN.
Verse code runs on the server. When Verse code slows the server down, players usually do not see a drop in frame rate. Instead, the game responds late: doors open late, or actions take effect after a delay. If your experience feels like there is lag but the client frame rate looks fine, Verse code is a likely cause.
To see this workflow on an example island, watch UEFN Verse Insights Tutorial.
Before You Begin
Verse Insights requires the following:
A UEFN project with Verse code.
Familiarity with the Frames, Timing View, Timers, and Callees panels in Timing Insights. See Timing Insights in UEFN.
Set up Verse Insights
Turn on Verse Insights before you launch the session.
Open your UEFN project.
In the toolbar, open Launch Options and turn on Use Verse VM.
If you don’t see Use Verse VM, skip this step. Verse Insights still works.
Launch a session.
Select Tools > Profile and open Timing Insights.
In the Main Toolbar, open the profiling target drop-down and select Server. Verse code runs on the server, so you must select Server before you start a capture.
Capture Verse Execution
In the Main Toolbar, click Start. Profiling starts on the server, and trace data streams back to UEFN.
In the client, play the part of your experience where you notice lag. Repeat the action that causes it a few times so the capture includes it.
When you have captured the problem, click Stop.
Place the Timing Insights window side by side with your game. As you play, you can see which actions cause tall bars in the Frames panel.
Read the Results
Find the slow function in the Timing View panel
In the Frames panel, click one of the tall bars. The Timing View panel shows the Verse functions that ran in that frame.
In the Timing View panel, find the GameThread track. Your Verse timing events appear on this track.
Start at the top of the track and work down. Look for the timing event that is both wide and as low in the stack as possible. That is the closest you can get to the work that is actually costing time.
As in any Timing Insights capture, the wider a timing event, the longer it took, and a timing event displayed below another timing event is running in the scope of the parent timing event.
At the top of the stack, you typically see OnBegin. This is where a Verse device starts running its code, so every timing event below it belongs to that device.
Confirm the Cost in the Timers and Callees Panels
In the Timers panel, sort by Incl and find your function.
Compare Incl and Excl. If your function has a large Incl and an Excl close to zero, the time is spent in the functions it calls, not in the function itself.
Timers such as OnBegin also show a large Incl, because everything in the device runs under them.
Select your function and open the Callees panel. Follow the hot path down to where the time ends up.
Bytecode and Native Code
Verse Insights also shows what kind of work the time went into:
Bytecode: Your Verse code is compiled into bytecode, a set of instructions that the Verse virtual machine (VM) runs one at a time.
Native code: Many built-in Verse functions, such as math functions, run as native C++ code instead.
In either case, you can make the code run faster by changing your Verse code.
Confirm the Hot Spot
A hot spot that appears in only one capture is usually not the one to fix first. Before you change your code:
Capture a different part of your experience, or a different type of gameplay.
Check whether the same function is still the widest timing event, or whether another function also contributes.
Fix the function that consistently takes the most time.
Fix the Code
When the hot path ends in a built-in function, such as a distance calculation, that function is usually not the problem. Look a few steps up the stack for the code that calls it too many times, and fix that code.
You can also use Verse Insights through the UEFN MCP, so an AI agent can capture and read Verse performance data for you. See Profiling Your Island with the UEFN MCP.
Two common fixes:
Do less work per call. For example, if your code checks whether a player is near a building by measuring the distance to every point on a grid around it, find the single point on the building closest to the player and measure the distance to that point only.
Run the code less often. Not all code needs to run every frame. Code that is not critical to gameplay can often run a few times per second instead of every frame without the player noticing.
Verify the Fix
Capture again under the same gameplay conditions.
In the Timers panel, compare your function's time per frame with the earlier capture.
In the Frames panel, confirm the bars stay short during the action that caused the lag.