Wait For Trigger FPS Profiler.

I have read the documentation on this but I am still vague on exactly what it is and how i can reduce it.

Profiler states the following about WaitForTargetFPS:
92.2% of total
1 Call
12.56 Time ms
12.56 ms

Firstly what exactly is WaitForTargetFPS and also how can I help reduce it.

The documentation says the following:

View SyncTime

When running at a fixed framerate or running in sync with the vertical blank, Unity records the waiting time in “Wait For Target FPS”. By default this amount of time is not shown in the profiler. To view how much time is spent waiting, you can toggle “View SyncTime”. This is also a measure of how much headroom you have before losing frames.

If anyone can help shed some light I would really appreciate it. I am working hard on optimization, I have done Occlission culling and when i use the combineMeshes script it tends to mess up the spot light on my cameras.

Cheers in advance guys.

If you have specified via code (Application.targetFrameRate) or quality settings (V-Blank) that rendering should match a certain frame rate, Unity will try to sync to that framerate simply by waiting a bit before applying a rendering.

The profiler lists this sync wait time as WaitForTargetFPS.

If you have a high percentage reported on WaitForTargetFPS, you are in the clear. It means that your game prepares the frames fast.
If you have a low percentage reported on WaitForTargetFPS, you might need to optimize. It means that your game takes too much time to prepare frames. Your game now and then might miss a frame sync and wait for the next frame sync. Every frame skip is visible.

In theory sync’ing to V-Blank is a good idea, since

  • the monitor only refreshes its screen at each V-Blank, so if all things are well-coordinated, it doesn’t make sense to produce more frames than the monitor can display.
  • code in once per frame loops e.g. Update() will run at a minimum, which means that less garbage (to be collected by garbage collector) is produced per second.

In practice you might get better results by disabling V-sync or framerate targets.