Skip to content

Commit

Permalink
fix: reduce memory usage in group chats by 75%
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Green-Sky committed Dec 18, 2024
1 parent 4f09f4e commit 11ab1d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toxcore/group_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 11ab1d2

Please sign in to comment.