mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-13 02:40:07 -04:00
The last commit provides time-based filtering. Unfortunately, it wastes
90% of the time calling the expensive time()/localtime()/mktime()
functions.
This patch does 3 things :
- call time()/localtime() only once to initialize the correct
struct timeinfo ;
- call mktime() only when the time has changed regardless of
the current second.
- manually add the current second to the cached result.
Doing just this is enough to multiply the parsing speed by 8.
|
||
|---|---|---|
| .. | ||
| base64 | ||
| halog | ||
| ip6range | ||
| iprange | ||
| netsnmp-perl | ||
| selinux | ||
| systemd | ||
| trace | ||