Selaa lähdekoodia
Improve performance disabling "deletion" observation
Now the VTK pointer is set to zero independently of the DeleteEvent
observation, the observation is only needed to explicitly
disconnect the Qt slots. Since keeping the connected slots around doesn't
impact performance, this commit disabled the "deletion" observation.
If needed, a future additional improvement would be the pruning of
connection there are associated with deleted VTK object. This could be
done in the same loop taking care of shadow connection.
Results of ctkVTKObjectTest1:
[ObserveDeletion = true]
148: Create 10000 connections...
148: elapsed time: 3.06955 seconds
148: Remove 10000 connections...
148: elapsed time: 3.44588 seconds
[ObserveDeletion = false]
148: Create 10000 connections...
148: elapsed time: 0.775543 seconds
148: Remove 10000 connections...
148: elapsed time: 0.760212 seconds