summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2007-10-19 14:41:30 +0000
committererdgeist <>2007-10-19 14:41:30 +0000
commitdaf79f694d7e00395697fa84ab1b529ac44b3ab1 (patch)
tree8f8b8330583156a8a578fd408b62403294372855
parent870c995fbbae0f5f474ec5487b45fc994e615feb (diff)
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.
-rw-r--r--trackerlogic.h6
1 files 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;
45extern time_t g_now; 45extern time_t g_now;
46#define NOW (g_now/OT_POOLS_TIMEOUT) 46#define NOW (g_now/OT_POOLS_TIMEOUT)
47 47
48#define OT_VECTOR_MIN_MEMBERS 16 48#define OT_VECTOR_MIN_MEMBERS 4
49#define OT_VECTOR_GROW_RATIO 4 49#define OT_VECTOR_GROW_RATIO 8
50#define OT_VECTOR_SHRINK_THRESH 5 50#define OT_VECTOR_SHRINK_THRESH 6
51#define OT_VECTOR_SHRINK_RATIO 4 51#define OT_VECTOR_SHRINK_RATIO 4
52typedef struct { 52typedef struct {
53 void *data; 53 void *data;