This is an optimization employed by Zino 1, so Zino 2 should do it as well:
The polldevs.cf file is read and parsed on a set interval. Differences between polldevs.cf and the running configuration are detected and executed internally.
However, repeatedly parsing the full polldevs.cf is a waste of time if it rarely changes (time that could be spent polling devices, rather than blocking the event loop). The reloading routine should keep track of the modified-time (mtime) of the polldevs.cf file, and only initiate a reload if it detects that the file has been modified since it was last read.
This is an optimization employed by Zino 1, so Zino 2 should do it as well:
The
polldevs.cf
file is read and parsed on a set interval. Differences betweenpolldevs.cf
and the running configuration are detected and executed internally.However, repeatedly parsing the full
polldevs.cf
is a waste of time if it rarely changes (time that could be spent polling devices, rather than blocking the event loop). The reloading routine should keep track of the modified-time (mtime
) of thepolldevs.cf
file, and only initiate a reload if it detects that the file has been modified since it was last read.