From cfb4774ade9a953a3bd836179aff7c67b44f36db Mon Sep 17 00:00:00 2001 From: El Date: Sun, 25 May 2025 01:46:24 +0500 Subject: [PATCH] VNC-156 Fix cpu core count detection for better cpu utilization --- common/rfb/EncodeManager.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx index 7182afc..87c53f5 100644 --- a/common/rfb/EncodeManager.cxx +++ b/common/rfb/EncodeManager.cxx @@ -20,7 +20,6 @@ */ #include - #include #include #include @@ -212,7 +211,7 @@ EncodeManager::EncodeManager(SConnection* conn_, EncCache *encCache_) : conn(con dynamicQualityOff = Server::dynamicQualityMax - Server::dynamicQualityMin; } - const auto num_cores = tbb::this_task_arena::max_concurrency() / 2; + const auto num_cores = cpu_info::cores_count; arena.initialize(num_cores); }