Skip to content
SiteEmail

Performance markers

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.

Enabling or disabling the performance markers in Unreal Engine is very straightforward:

  1. (optional) Ensure that the cohtml::Library has been initialized. This should already be true when launching your project since it is initialized with the CohtmlPlugin module startup.
  2. 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 your View.
  3. Stop tracing when convenient — this can be done by simply calling ICohtmlPlugin::Get().EnableProfiling(false)
  4. 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 via chrome://tracing/ or Perfetto. For more information check out the native documentation.

There are a couple of other configurable options related to performance markers:

  • Trace Path: You can configure the path where your trace file is saved, using ICohtmlPlugin::Get().EnableProfiling()’s TraceFilePath parameter.
  • Level of Detail: You can configure the level of detail of the performance markers, using ICohtmlPlugin::Get().EnableProfiling()’s TraceLevel parameter.
    • Basic markers Default — preferred value.
    • All markers — less performant and more verbose option.