ENH: Add Scene Performance test

It measures time spent by some scene actions such as loading, closing,
restoring, relayouting a scene or modifying/adding nodes.
Issue #2642

Example of performance on a MacBookPro laptop (2.4GHz):
AddData (BrainAtlas2012.mrb) took 44865 msecs
CloseScene () took 28706 msecs
AddData (BrainAtlas2012.mrb) took 44579 msecs
ModifyNode (vtkMRMLScalarVolumeNode1) took 4 msecs
ModifyNode (vtkMRMLScalarVolumeNode2) took 35 msecs
ModifyNode (vtkMRMLScalarVolumeNode3) took 20 msecs
ModifyNode (vtkMRMLModelHierarchyNode2) took 14 msecs
ModifyNode (vtkMRMLModelNode4) took 0 msecs
ModifyNode (vtkMRMLModelDisplayNode5) took 14 msecs
ModifyNode (vtkMRMLModelHierarchyNode3) took 13 msecs
ModifyNode (vtkMRMLModelStorageNode1) took 4 msecs
ModifyNode (vtkMRMLModelHierarchyNode301) took 18 msecs
ModifyNode (vtkMRMLModelDisplayNode304) took 23 msecs
ModifyNode (vtkMRMLModelHierarchyNode51) took 19 msecs
AddNode (vtkMRMLModelNode302) took 46 msecs

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21579 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Speed-up vtkObject event invokes

Issue #2642

Example of performance on a MacBookPro laptop:
AddData (BrainAtlas2012.mrb) took 39877 msecs
CloseScene () took 26271 msecs
CloseScene () took 136 msecs
AddData (BrainAtlas2012.mrb) took 36945 msecs
ModifyNode (vtkMRMLScalarVolumeNode1) took 4 msecs
ModifyNode (vtkMRMLScalarVolumeNode2) took 28 msecs
ModifyNode (vtkMRMLScalarVolumeNode3) took 16 msecs
ModifyNode (vtkMRMLModelHierarchyNode2) took 13 msecs
ModifyNode (vtkMRMLModelNode5) took 1 msecs
ModifyNode (vtkMRMLModelNode4) took 0 msecs
ModifyNode (vtkMRMLModelDisplayNode5) took 12 msecs
ModifyNode (vtkMRMLModelHierarchyNode3) took 12 msecs
ModifyNode (vtkMRMLModelStorageNode1) took 4 msecs
ModifyNode (vtkMRMLModelHierarchyNode301) took 17 msecs
ModifyNode (vtkMRMLModelDisplayNode304) took 21 msecs
ModifyNode (vtkMRMLModelHierarchyNode302) took 17 msecs
AddNode (vtkMRMLModelNode5) took 90 msecs
AddNode (vtkMRMLModelNode302) took 45 msecs

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21580 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Speed-up vtkEventBroker

Issue #2642

Example of performance on a MacBookPro laptop:
AddData (BrainAtlas2012.mrb) took 37541 msecs
CloseScene () took 26276 msecs
CloseScene () took 117 msecs
AddData (BrainAtlas2012.mrb) took 37057 msecs
ModifyNode (vtkMRMLScalarVolumeNode1) took 4 msecs
ModifyNode (vtkMRMLScalarVolumeNode2) took 26 msecs
ModifyNode (vtkMRMLScalarVolumeNode3) took 15 msecs
ModifyNode (vtkMRMLScalarVolumeDisplayNode2) took 22 msecs
ModifyNode (vtkMRMLModelHierarchyNode2) took 10 msecs
ModifyNode (vtkMRMLModelNode4) took 0 msecs
ModifyNode (vtkMRMLModelDisplayNode5) took 11 msecs
ModifyNode (vtkMRMLModelHierarchyNode3) took 11 msecs
ModifyNode (vtkMRMLModelStorageNode1) took 4 msecs
AddNode (vtkMRMLModelNode302) took 41 msecs
Layout (3) took 52 msecs
Layout (2) took 18 msecs
RestoreSceneView (vtkMRMLSceneViewNode15) took 2911 msecs
RestoreSceneView (vtkMRMLSceneViewNode15) took 1608 msecs

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21581 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Speed-up ctkVTKConnection

Issue #2642

Example of performance on a MacBookPro laptop:
AddData (BrainAtlas2012.mrb) took 32574 msecs
CloseScene () took 24954 msecs
CloseScene () took 104 msecs
AddData (BrainAtlas2012.mrb) took 30087 msecs
ModifyNode (vtkMRMLScalarVolumeNode1) took 4 msecs
ModifyNode (vtkMRMLScalarVolumeNode1) took 3 msecs
ModifyNode (vtkMRMLScalarVolumeNode2) took 25 msecs
ModifyNode (vtkMRMLScalarVolumeNode3) took 16 msecs
ModifyNode (vtkMRMLScalarVolumeDisplayNode2) took 22 msecs
ModifyNode (vtkMRMLModelHierarchyNode2) took 10 msecs
ModifyNode (vtkMRMLModelNode4) took 0 msecs
ModifyNode (vtkMRMLModelDisplayNode5) took 11 msecs
ModifyNode (vtkMRMLModelHierarchyNode3) took 10 msecs
ModifyNode (vtkMRMLModelStorageNode1) took 4 msecs
AddNode (vtkMRMLModelNode302) took 31 msecs
Layout (3) took 66 msecs
Layout (2) took 20 msecs
Layout (3) took 53 msecs
Layout (2) took 19 msecs
RestoreSceneView (vtkMRMLSceneViewNode15) took 2730 msecs
RestoreSceneView (vtkMRMLSceneViewNode15) took 1556 msecs

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21582 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Speed-up vtkMRMLScene references

Issue #2642

Example of performance on a MacBookPro laptop:
AddData (BrainAtlas2012.mrb) took 30911 msecs
CloseScene () took 21943 msecs
CloseScene () took 76 msecs
AddData (BrainAtlas2012.mrb) took 29535 msecs
ModifyNode (vtkMRMLScalarVolumeNode1) took 4 msecs
ModifyNode (vtkMRMLScalarVolumeNode2) took 25 msecs
ModifyNode (vtkMRMLScalarVolumeDisplayNode2) took 23 msecs
ModifyNode (vtkMRMLScalarVolumeNode3) took 15 msecs
ModifyNode (vtkMRMLModelHierarchyNode2) took 10 msecs
ModifyNode (vtkMRMLModelNode4) took 0 msecs
ModifyNode (vtkMRMLModelDisplayNode5) took 11 msecs
ModifyNode (vtkMRMLModelHierarchyNode3) took 11 msecs
ModifyNode (vtkMRMLModelStorageNode1) took 5 msecs
AddNode (vtkMRMLModelNode302) took 31 msecs
Layout (3) took 9 msecs
Layout (2) took 27 msecs
Layout (3) took 50 msecs
RestoreSceneView (vtkMRMLSceneViewNode15) took 2701 msecs
RestoreSceneView (vtkMRMLSceneViewNode15) took 1542 msecs

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21583 3bd1e089-480b-0410-8dfb-8563597acbee