-
rswindell authored
use this in place of system.node_list[] if you're going to be using a lot of the properties and passing them around to methods which are going to each possibly dereference the values, as *each* deference results in a read of the node record in the node.dab. On my system, a simple node list (e.g. /L command) would result in between 60 and 100 reads of the node.dab (for a 13 node system), which was nuts. The system.get_node() method currently leaves the node record unlocked and there is currently no equivalent put_node() method, so you still need to use the system.node_list[] for modification of node records. But, I now see there are race conditions with the current methods of read-modify-writes of the node_list[] properties. We should be locking a node.dab record, reading it, modifying it, writing it, and then unlocking it - as is done in the C/C++ code. So... that's a todo item. Also created system.stats.node_gets to track the number of node.dab reads from a single instance of the system object. May remove this any time.
rswindell authoreduse this in place of system.node_list[] if you're going to be using a lot of the properties and passing them around to methods which are going to each possibly dereference the values, as *each* deference results in a read of the node record in the node.dab. On my system, a simple node list (e.g. /L command) would result in between 60 and 100 reads of the node.dab (for a 13 node system), which was nuts. The system.get_node() method currently leaves the node record unlocked and there is currently no equivalent put_node() method, so you still need to use the system.node_list[] for modification of node records. But, I now see there are race conditions with the current methods of read-modify-writes of the node_list[] properties. We should be locking a node.dab record, reading it, modifying it, writing it, and then unlocking it - as is done in the C/C++ code. So... that's a todo item. Also created system.stats.node_gets to track the number of node.dab reads from a single instance of the system object. May remove this any time.