From 11ab1d2a7232eee19b51ce126ccce267d6578903 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 27 Apr 2024 10:48:22 +0200 Subject: [PATCH] fix: reduce memory usage in group chats by 75% Significantly reduced the memory usage of groups since all message slots are preallocated for every peer for send and receive buffers of buffer size (hundreds of MiB peak when save contained alot of peers to try to connect to) --- toxcore/group_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toxcore/group_common.h b/toxcore/group_common.h index daa8fe17c8..0e965bb148 100644 --- a/toxcore/group_common.h +++ b/toxcore/group_common.h @@ -52,7 +52,7 @@ #define MAX_GC_PACKET_SIZE (MAX_GC_PACKET_CHUNK_SIZE * 100) /* Max number of messages to store in the send/recv arrays */ -#define GCC_BUFFER_SIZE 8192 +#define GCC_BUFFER_SIZE 2048 /** Self UDP status. Must correspond to return values from `ipport_self_copy()`. */ typedef enum Self_UDP_Status {