From daf79f694d7e00395697fa84ab1b529ac44b3ab1 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 19 Oct 2007 14:41:30 +0000 Subject: [PATCH] After studying opentracker live data, I decided to radically reduce default allocation for vectors and making it grow faster instead: Most pools only had one or two peers, wasting 8*15 or 8*14 bytes. --- trackerlogic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trackerlogic.h b/trackerlogic.h index b94679e..81bd913 100644 --- a/trackerlogic.h +++ b/trackerlogic.h @@ -45,9 +45,9 @@ typedef time_t ot_time; extern time_t g_now; #define NOW (g_now/OT_POOLS_TIMEOUT) -#define OT_VECTOR_MIN_MEMBERS 16 -#define OT_VECTOR_GROW_RATIO 4 -#define OT_VECTOR_SHRINK_THRESH 5 +#define OT_VECTOR_MIN_MEMBERS 4 +#define OT_VECTOR_GROW_RATIO 8 +#define OT_VECTOR_SHRINK_THRESH 6 #define OT_VECTOR_SHRINK_RATIO 4 typedef struct { void *data;