Hi,
I'm currently working on a Python audisp plugin. My main routine looks like this:
if __name__ == '__main__':
try:
...
aup = auparse.AuParser(auparse.AUSOURCE_FEED)
aup.add_callback(process_event, None)
while True:
for _ in fileinput.input():
aup.feed(_)
except:
...
While profiling my plugin, I noticed that 95% + of the CPU time used by my plugin is used in fileinput.input(), waiting/reading from input
Is there any way to lower this or preferred way to poll/read?
Thanks