You probably need to mutex updates to your global variable, which will probably suck out most of your performance gains.
Infact, I tried this out yesterday (having the one global_time variable), it
gives me around 3-4% improvement. But, occasionally I do get some
un-conforming results, and I'm trying to figure out if it's because of the
time stamp.
oooo, maybe that's the bug. If it really is a global variable and this is a threaded server, it's likely to break. We need a variable that's unique to the request. Probably the cleanest way to do that is introduce a new time parm to the functions called by do_cadget which need it.
I'll whip something like this up unless someone beats me to it.
Greg