From e9a32d5dc79ec96f4eb0520ffafd1c8b2334c5cd Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Mar 2020 01:15:13 +0100 Subject: [PATCH] Greatly increase queue block size. Previous block size could hold only 256 elements (8KB), which stressed out the memory allocator. Storing 65536 elements (2MB) per block almost completely reduces the allocator pressure. --- client/tracy_concurrentqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/tracy_concurrentqueue.h b/client/tracy_concurrentqueue.h index 9e62d7c2..efa0f817 100644 --- a/client/tracy_concurrentqueue.h +++ b/client/tracy_concurrentqueue.h @@ -191,7 +191,7 @@ struct ConcurrentQueueDefaultTraits // but many producers, a smaller block size should be favoured. For few producers // and/or many elements, a larger block size is preferred. A sane default // is provided. Must be a power of 2. - static const size_t BLOCK_SIZE = 256; + static const size_t BLOCK_SIZE = 64*1024; // For explicit producers (i.e. when using a producer token), the block is // checked for being empty by iterating through a list of flags, one per element.