Performance markers
On this page
Overview
Prysm can emit performance markers, letting you observe a timeline of the most important UI processing events and their duration.
This page mainly relates to the APIs or techniques specific to the Prysm Unreal Engine plugin and integration. It is highly recommended that you read the native Prysm performance markers documentation for an extended overview and more engine-agnostic performance optimization techniques.
Performance markers are only available when running Prysm in
Development
configuration. For more information, please visit the SDK configurations pageHow to use
Enabling or disabling the performance markers in Unreal Engine is very straightforward:
- (optional) Ensure that the
cohtml::Library
has been initialized. This should already be true when launching your project since it is initialized with theCohtmlPlugin
module startup. - Call the
ICohtmlPlugin::Get().EnableProfiling(bool bEnabled = true)
method to start your performance tracing at a convenient time. For example, this could be right after loading a new URL page to yourView
. - Stop tracing when convenient - this can be done by simply calling
ICohtmlPlugin::Get().EnableProfiling(false)
- Observe your performance markers. On desktop platforms which use
minitrace
, such as Windows, this would require finding a trace file (Game/Saved/Cohtml/profiling/trace.json
by default) and opening it viachrome://tracing/
or Perfetto. For more information check out the native documentation
Details
There are a couple of other configurable options related to performance markers:
- You can configure the path where your trace file is saved, using
ICohtmlPlugin::Get().EnableProfiling()
’sTraceFilePath
parameter. - You can configure the level of detail of the performance markers, using
ICohtmlPlugin::Get().EnableProfiling()
’sTraceLevel
parameter. There are currently two options - either emit only “basic markers”, or “all markers”. Emitting basic markers is the default (and preferred) value, with “all markers” being the less performant and more verbose option.