When polling unix agent processes we add the processes to the db in one large query instead of an individual query for each of them. Reduces the time taken.
Auto-Deploy finished, Test PR at http://1447.ci.librenms.org or https://1447.ci.librenms.org
This looks OK to me, although I wonder whether we wouldn't get the same performance by simply wrapping this in a begin/commit block.
@paulgear are you wondering or do you know? It would be good if it worked as I was going to tackle the package code next as it is similarly using individual inserts and deletes. Though that code is a bit more complex.
Just found this: https://dev.mysql.com/doc/refman/5.7/en/insert-speed.html
Not sure if the transaction will help as it is still multiple connections or have I got it upside down?
I actually should write a dbFacile dbInsertBulk, dbDeleteBulk and dbUpdateBulk functions for this. These could take table name, field headers, primary key and a array for the data as parameters? We could then optimise there?
Processes get added to db in one big query instead of individual row …
Escape values passed to query.