0029830: STEPCAFControl_Reader poor performance - quadratic dependence
Various performance improvements in the algorithms of STEP read/write:
- Using the call to XCAFDoc_ShapeTool::SearchUsingMap() in STEPCAFControl_Reader::ReadColors() in order to quickly find the label of the shape.
- Place the label of a component to the map in order to avoid iteration on all components to find a label of a component shape. It is done both in XCAFDoc_ShapeTool and in STEPCAFControl_Reader.
- Using the map ShapeLabelMap in the method STEPCAFControl_Reader::FindInstance() to avoid iteration on components.
- Move invariant FindEntities() out of the loop in the method getStyledItem in STEPCAFControl/STEPCAFControl_Writer.cxx.
- Small fixes connected with elimination of excess copying of handles, calls of handle DownCasts and so on.
- Add pointer to the end of binders chain to the Transfer_Binder class in order to speed up adding a binder to the chain.
Remove stack overflow during destruction of STEP model with long chains of Transfer_Binder.
Make it possible to use the Draw commands ReadStep and WriteStep to read/write from the session without accessing the disk file (use '.' for the file name).
Add performance test cases for STEP reading/writing.