From c6c20ca6713dda7b5502fbb656c4c2f0829cc186 Mon Sep 17 00:00:00 2001 From: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com> Date: Wed, 21 May 2025 14:42:50 +0100 Subject: [PATCH] only half of hw threads --- include/xrpl/basics/partitioned_unordered_map.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/xrpl/basics/partitioned_unordered_map.h b/include/xrpl/basics/partitioned_unordered_map.h index 4e503ad0fa..ee4ee3de12 100644 --- a/include/xrpl/basics/partitioned_unordered_map.h +++ b/include/xrpl/basics/partitioned_unordered_map.h @@ -255,9 +255,10 @@ public: { // Set partitions to the number of hardware threads if the parameter // is either empty or set to 0. - partitions_ = partitions && *partitions - ? *partitions - : std::thread::hardware_concurrency(); + partitions_ = std::size_t{std::thread::hardware_concurrency() / 2}; + // partitions && *partitions + // ? *partitions + // : std::thread::hardware_concurrency(); map_.resize(partitions_); XRPL_ASSERT( partitions_,