Performance Handler
Overview of Performance Handler
Section titled “Overview of Performance Handler”During the initialization of Gameface‘s Library you can set your own object to LibraryParams::PerformanceHandler which implements Profile::IPerformanceHandler interface. Its purpose is to provide additional information to the developers when there is a performance hit in the UI and receive some guidelines how to reduce it.
For example, if the UI has reached the maximum of temporary texture cache you’ll receive a message:
One approach here is to check which elements are responsible for more scratch textures creation and try to optimize it. The other option is to increase the cache size.
class PerformanceHandler : public cohtml::Profile::IPerformanceHandler{
public: virtual void WriteLog(const char* message, size_t /*length*/) override { // Apply text colorize if it's needed std::cout << "Performance Warning" << ": " << message << std::endl; }};
cohtml::Profile::IPerformanceHandler* gPerfHandler;
{ gPerfHandler = new PerformanceHandler();
... Library's initialization LibraryParams params; // Logs with what minimum severity and message types we want to receive and logs intended for which users params.LoggingFilters = { cohtml::Logging::TargetUser::All, cohtml::Logging::MessageType::All, cohtml::Logging::Severity::Warning }; params.LogHandler = gLogger; params.PerformanceHandler = gPerfHandler; ....}© 2026 Coherent Labs. All rights reserved.