This commit fixes a performance bug caused by a tight loop
that permanently checks whether there are delayed commands
to be processed. This bug does not show if we give the agent
a port option to listen to, because in that case the loop
mentioned above includes a poll operation with a timeout of 250ms.
This commit also makes the following changes:
All commands coming for the command file are read during agent load
and inserted into a linked list sorted by the time when the
command needs to be applied
Replaced the code that was always sorting the array of commands
(now we insert in the right place to keep the collection always sorted)
Removed some of the functions that are no longer needed
Removed some of the conversions from string to json and back
Increased the poll timeout value from 250ms to 500ms
This commit fixes a performance bug caused by a tight loop that permanently checks whether there are delayed commands to be processed. This bug does not show if we give the agent a port option to listen to, because in that case the loop mentioned above includes a poll operation with a timeout of 250ms.
This commit also makes the following changes:
Signed-off-by: Marius Pirvu mpirvu@ca.ibm.com