diff options
author | erdgeist <> | 2007-10-19 14:41:30 +0000 |
---|---|---|
committer | erdgeist <> | 2007-10-19 14:41:30 +0000 |
commit | daf79f694d7e00395697fa84ab1b529ac44b3ab1 (patch) | |
tree | 8f8b8330583156a8a578fd408b62403294372855 /trackerlogic.h | |
parent | 870c995fbbae0f5f474ec5487b45fc994e615feb (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.
Diffstat (limited to 'trackerlogic.h')
-rw-r--r-- | trackerlogic.h | 6 |
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; | |||
45 | extern time_t g_now; | 45 | extern 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 |
52 | typedef struct { | 52 | typedef struct { |
53 | void *data; | 53 | void *data; |