This patch reduces the frequency of calling getrusage resulting in a ~3-5%
performance improvement in parsing. We do a check in the beginning and then
check once every 10000 events.
My only worry is how to come up with a good value for CHECK_MEM_COUNT. 10000 is as good as any value, so let's wait for somebody to complain and then we will adjust it.
This patch reduces the frequency of calling getrusage resulting in a ~3-5% performance improvement in parsing. We do a check in the beginning and then check once every 10000 events.
Signed-off-by: Joel Fernandes joelaf@google.com