expire and history format
Igor Timkin
ivt at gamma.ru
Sun Oct 22 12:41:12 UTC 2000
I see in expire.c a lot of:
where = Offset;
(void)fprintf(out, "%s%c%s\n", fields[0], HIS_FIELDSEP, fields[1]);
Offset += strlen(fields[0]) + 1 + strlen(fields[1]) + 1;
and plan to replace with:
where = ftell(out);
(void)fprintf(out, "%s%c%s\n", fields[0], HIS_FIELDSEP, fields[1]);
to reduce CPU's load. inn/his.c use this construction.
And second and main. What's about to convert history to binary format ?
History has fix format line. I has pathes (not full) against current-199904XX.
Binary format will reduce CPU/disk/VM usage and simplify C code.
Instead of
[63A81CBDFBBFC59D22700429B1D2F98D] 971839628~- (47 bytes)
or
[6FD6EEEC13E5C6CC8E6B3019375325C7] 972217961~-~972215626 @0304627566313100000000C4246A00000057@ (96 bytes)
I plan to use:
typedef struct _HIS_LINE {
HASH hash;
unsigned long arrived;
unsigned long expires;
unsigned long posted;
TOKEN token;
} HIS_LINE;
sizeoff(HIS_LINE)=46
If answer "yes" I'll make pathes and test this patch set
on my {news,news1,newsfeed}.gamma.ru before sending to inn-pathes.
More information about the inn-workers
mailing list