Skip to Content
DocsFind Lag
DocsFind Lag

Find lag

When your game stutters or feels slow, tell Ziva what you see. Ziva plays that moment, measures how fast the game runs, finds what is using the time, and checks again after fixing it. You do not need to open Godot’s profiler.

Ask Ziva why it lags

  1. Describe the slow moment, for example “my game stutters when lots of enemies spawn”.
  2. Ziva runs the scene in the Game tab and plays up to that moment.
  3. A speed card appears in the chat:
    • what happened, for example “FPS drops from 60 to 6 between 1.8s and 4.9s”
    • a small FPS graph with the slow part shaded
    • where the time goes, with links to the scripts and lines, for example res://enemy.gd:4 _physics_process
  4. Ziva explains the cause, offers a fix, applies it, and runs the same moment again. The card then shows the FPS before and after the change.

If the game should run faster than 60 FPS, say so, for example “it needs to hold 120 FPS”.

Plans

Finding lag works on every plan. The game runs on your computer, so it does not add model calls beyond the chat itself.

Privacy

The game runs on your computer. Frame timings and the names of the slowest functions go to your selected model as text so it can find the cause. Nothing else from the run is uploaded.

Good to know

  • Ziva measures the game inside the editor, which runs a bit slower than an exported game. Use the numbers to compare before and after, not as the final speed on players’ devices.
  • When the game is slow, Ziva runs the moment a second time with Godot’s script profiler on. The profiler slows scripts down a little, so the timings in Where the time goes are for comparing functions with each other.
  • With vsync on, the game never goes above your monitor’s refresh rate, so 60 FPS can still mean there is room to spare.

Troubleshooting

Ziva says a game is already running. Stop the game you started in the Game tab, then ask again.

The card shows no functions. The slowdown is in drawing rather than scripts, or the profiler could not start. Ziva still reports what grew during the slow moment, such as nodes or draw calls. Updating the Ziva plugin fixes a profiler that does not start.

The FPS jumps around between runs. Other programs on your computer affect the numbers. Close heavy apps and ask Ziva to run it again.

Last updated on