From d4d0189157774daa503496ca2eb21bb85e9d3446 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 3 Jan 2025 21:22:43 -0800 Subject: [PATCH] Revert "Add Advanced Config parameter for thread count" This reverts commit 2e0f688b97dcae1a08a1e2f982332b01bd342d5d. --- common/advanced_config.cpp | 8 +------- include/advanced_config.h | 9 --------- include/singleton.h | 4 +--- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/common/advanced_config.cpp b/common/advanced_config.cpp index 70df2e915b..3fbe56d7cf 100644 --- a/common/advanced_config.cpp +++ b/common/advanced_config.cpp @@ -121,9 +121,9 @@ static const wxChar EnableExtensionSnaps[] = wxT( "EnableExtensionSnaps" ); static const wxChar ExtensionSnapTimeoutMs[] = wxT( "ExtensionSnapTimeoutMs" ); static const wxChar ExtensionSnapActivateOnHover[] = wxT( "ExtensionSnapActivateOnHover" ); static const wxChar EnableSnapAnchorsDebug[] = wxT( "EnableSnapAnchorsDebug" ); +static const wxChar EnableJobset[] = wxT( "EnableJobset" ); static const wxChar MinParallelAngle[] = wxT( "MinParallelAngle" ); static const wxChar HoleWallPaintingMultiplier[] = wxT( "HoleWallPaintingMultiplier" ); -static const wxChar MaximumThreads[] = wxT( "MaximumThreads" ); } // namespace KEYS @@ -296,8 +296,6 @@ ADVANCED_CFG::ADVANCED_CFG() m_MinParallelAngle = 0.001; m_HoleWallPaintingMultiplier = 1.5; - m_MaximumThreads = 0; - loadFromConfigFile(); } @@ -567,10 +565,6 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg ) &m_HoleWallPaintingMultiplier, m_HoleWallPaintingMultiplier, 0.1, 100.0 ) ); - configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MaximumThreads, - &m_MaximumThreads, m_MaximumThreads, - 0, 500 ) ); - // Special case for trace mask setting...we just grab them and set them immediately // Because we even use wxLogTrace inside of advanced config wxString traceMasks; diff --git a/include/advanced_config.h b/include/advanced_config.h index e329aa26a5..d3a31201ec 100644 --- a/include/advanced_config.h +++ b/include/advanced_config.h @@ -707,15 +707,6 @@ public: */ double m_HoleWallPaintingMultiplier; - /** - * Default value for the maximum number of threads to use for parallel processing. - * Setting this value to 0 or less will mean that we use the number of cores available - * - * Setting name: "MaximumThreads" - * Default value: 0 - */ - int m_MaximumThreads; - ///@} private: diff --git a/include/singleton.h b/include/singleton.h index 27b9dd74ca..7a0f5f1a86 100644 --- a/include/singleton.h +++ b/include/singleton.h @@ -21,7 +21,6 @@ #define KICAD_SINGLETON_H #include -#include class KICAD_SINGLETON { @@ -39,8 +38,7 @@ public: void Init() { - int num_threads = std::max( 0, ADVANCED_CFG::GetCfg().m_MaximumThreads ); - m_ThreadPool = new BS::thread_pool( num_threads ); + m_ThreadPool = new BS::thread_pool(); } BS::thread_pool* m_ThreadPool;