Massive performance and memory improvements can be had by eliminating the internal use of Gridpoints, and instead use tuples.
Tuples take about 1/10th the time to create, and take up far less space in memory.
Gridpoints/SpotElevations are used extensively within pyProm for handling basic nodes, the problem is creating and destroying these objects is actually a very wasteful process. These were originally intended as a means to make pyProm more "pythonic". These objects serve no real purpose other than to display to the user the node in question. Therefore, it makes sense to instead use a tuple in place of an object.
For Instance GridPoint(1,2,100) could just as easily be tuple(1,2,100). Data gathered from Getters can convert these tuples to GridPoints if the user requests them.
This also provides a clear improvement when saving these objects to files.
Massive performance and memory improvements can be had by eliminating the internal use of Gridpoints, and instead use tuples.
Tuples take about 1/10th the time to create, and take up far less space in memory.
Gridpoints/SpotElevations are used extensively within pyProm for handling basic nodes, the problem is creating and destroying these objects is actually a very wasteful process. These were originally intended as a means to make pyProm more "pythonic". These objects serve no real purpose other than to display to the user the node in question. Therefore, it makes sense to instead use a tuple in place of an object.
For Instance GridPoint(1,2,100) could just as easily be tuple(1,2,100). Data gathered from Getters can convert these tuples to GridPoints if the user requests them.
This also provides a clear improvement when saving these objects to files.