2.9.16
Coherent GT
A modern user interface library for games
On-screen Performance Info

GT has a built-in profiler that displays information about how much time GT spends in its major subsystems such as scripting and rendering.

Enable on-screen performance metrics in the GTPlayer from the panel at the top or by pressing CTRL + P. To enable it programatically, call Coherent::UIGT::View::EnableOnScreenPerformanceInfo. You'll be displayed with several counters displaying various information. The counters are split in CPU and GPU information and their descriptions can be found below.

Main thread counters

  1. System advance - the time the system took to advance internal timers (including CSS animation timers), download and process resources (CSS / JS / image / font files) and execute JS scripts. Equivalent to the time spent in Coherent::UIGT::UISystem::Advance. This timer is affected by the number and complexity of CSS animations and the number and size of the resources to be processed as well as whether they are local or downloaded via HTTP(S).
  2. JS timers - the time the view took to execute any pending JS timers caused by calls to requestAnimationFrame, setTimeout or setInterval. Equivalent to the time spent in Coherent::UIGT::View::ExecuteJSTimers.
  3. Styling and layout - the time the view took to compute what styles affect each element and where to place the element in accordance to the HTML standard. Equivalent to the time spent in Coherent::UIGT::View::UpdateStylesAndLayout. This timer is affected by the number HTML elements that have changed since last frame and by the number and complexity of all loaded CSS rules.
  4. Record rendering commands - the time the view took to issue rendering commands for each element. Equivalent to the time spent in Coherent::UIGT::View::RecordRenderingCommands. Timer is affected by the number of elements that need to be repainted since last frame and the number of layers that need to be composited.
  5. Layers count - the number of layers GT currently has created. See Layers and how to use them for more info.

Rendering thread counters

Note
Most of the information here is too low level for designers / JS programmers and if you are amongst them you probably only need to look at the previous section.

In the 'Record rendering commands' step GT creates a list of high-level (frontend) commands such as 'Draw a red circle' or 'Clip this image'. These commands are translated to low-level (backend) commands such as 'Bind this shader' or 'Updated vertex buffer' within Coherent::UIGT::ViewRenderer::Paint and later executed inside renoir::RendererBackend::ExecuteRendering. Usually these operations are executed on the rendering thread.

  1. Frontend command count - the number of frontend commands GT has generated for the current frame.
  2. Backend command count - the number of backend commands generated from the current frame.
  3. Backend draw commands - the number of draw calls for the current frames.
  4. Backend clear commands - the number of clear render target calls for the current frame.
  5. Backend set RT commands - the number of commands for setting render target, effectively the number of render target changes for the frame.
  6. ExecuteBuffers - the time required for processing all frontend commands and execution of backend commands.
    1. Frontend commands - the time it took to translate the frontend commands to backend commands.
    2. Backend execution - the time it took to execute the backend commands on the graphics API.
  7. GPU time - the time it took to paint the last frame on the GPU. This stat is currently only visible on DX11.