Overview
Overview
Section titled “Overview”Gameface has a number of tools and features to help you profile and optimize your UI performance, loading times, and memory footprint.
The Gameface C++ SDK contains the following profiling, diagnostic, and optimization features:
Profiling and diagnostics
Section titled “Profiling and diagnostics”-
Inspector Performance Tracing - Gameface supports performance captures through the Chrome Inspector Performance tab. These captures can show important UI processing and rendering markers, such as
Advance,Paint,Process Frontend Commands Only,Execute Backend Buffers,Batch Commands, andProcess Layer, which can help identify expensive work on both the UI and rendering side. -
Profiling UI with the Player - The Player can be launched with
--profile-performanceto profile standalone HTML pages with profiling-friendly defaults. The option defaults tol1, and you can passl2orl3when you need more detailed markers. The preset hides Player-side overhead such as the GUI overlay and allocation tracking, while still allowing individual options to be overridden when more detailed diagnostics are needed. -
Enhanced Performance Tracing - Gameface can emit more detailed trace markers during Inspector captures. The tracing can also be filtered, allowing you to focus on a specific part of the frame or a specific subsystem.
-
Internal Profiling - The internal profiling API can be enabled through
cohtml::Library::EnableProfiling. It emits Gameface profiling markers that can be consumed by the default profiling backend, platform-specific native profilers, or routed to an external profiler such as Tracy. -
Performance Handler - You can provide a custom
Profile::IPerformanceHandlerthroughLibraryParams::PerformanceHandlerto receive performance-related warnings and notifications. This is useful to turn on while profiling, as it can point out expensive or undesirable runtime behavior, such as internal cache pruning or other conditions that may cause performance spikes. -
GPU Memory Tracking - Gameface can collect detailed GPU memory statistics through
cohtml::Library::GetGPUMemoryStats()and user texture memory statistics throughcohtml::Library::GetUserGPUMemoryStats(). This can help diagnose memory pressure, texture usage, and resource lifetime issues.
Runtime and loading optimizations
Section titled “Runtime and loading optimizations”-
Asynchronous Style Solving - Gameface can offload style solving from the main thread to a dedicated Style thread. This is enabled by default for better performance, but some APIs and features can force synchronization or fallback to synchronous style solving.
-
GPU fill path tessellation - Gameface uses GPU-based path fill tessellation by default where supported. This offloads path fill rendering work to the GPU and can significantly reduce CPU cost for complex path rendering, at the cost of slightly different visual output and a small increase in GPU memory usage.
-
Internal Caches - Gameface uses internal CPU and GPU caches to avoid expensive allocations every frame. The default cache sizes are suitable for most cases, but they can be tuned for specific UIs when memory usage or allocation behavior needs to be adjusted.
-
Preloaded Resources - Resource preloading allows HTML, CSS, JavaScript, fonts, images, and other resources to be fetched, parsed, decoded, or cached before a View needs them. This can greatly improve page initialization performance.
- User Images - User images allow the engine to provide already-created textures to Gameface. This is useful when image resources are loaded or managed by the engine, and can also help batching when multiple user images share the same texture or batching hint.
- Single frame loading - By preloading all resources needed by a page and satisfying resource requests immediately during the first
Advance, a page can be fully initialized and rendered in a single frame.
© 2026 Coherent Labs. All rights reserved.