chris-ali / j6dof-flight-sim

A high fidelity 6DOF flight simulation that the user can fly themselves or run to analyze an aircraft's flight dynamics
GNU General Public License v3.0
49 stars 13 forks source link

Plotting Is very slow when plots are generated for the second time #22

Closed chris-ali closed 8 years ago

chris-ali commented 8 years ago

When the plot window opens the first time, the execution is quite fast, but when opening it a second time, it can take on upwards of 10 seconds in both real time and in analysis modes

chris-ali commented 8 years ago

a3745d3add090a36f2c72dea9ff412fbe141d928 solves this. Setting the XYSeries objects to notify of a SeriesChangeEvent during each iteration of the loop in SimulationPlot adds a lot of unneccessary overhead. It is now set to notify only at the end of the loop, so that the plots axes can still resize as needed