[Bro] cf.c speedup patch
mtdedlow at lbl.gov
Fri Dec 16 09:46:24 PST 2005
This simple patch speeds up the cf program by 2-3 times (on my system)
for the typical log file I process, esp. conn logs.
It's based on the observation that the integer part of the unix
time typically repeats frequently (ie, the are many connections
per second) so it caches the time from one line to next, and only
bothers calling localtime() and strftime() if the time is different
than on the last line.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Bro