]> OCCT Git - occt-copy.git/commit
0029830: STEPCAFControl_Reader poor performance - quadratic dependence
authormsv <msv@opencascade.com>
Fri, 1 Jun 2018 11:38:39 +0000 (14:38 +0300)
committeremv <emv@opencascade.com>
Fri, 20 Jul 2018 11:18:27 +0000 (14:18 +0300)
commit019096a9249eb77c4fefc89a60e7e57d971641e0
treedb6736912be20583d684925cf0ad3ffa4d204605
parentfa641b9c4f727c39fb6254f070611d03ffc63baa
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.
17 files changed:
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Reader.hxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPControl/STEPControl_ActorRead.cxx
src/StepVisual/StepVisual_StyledItem.cxx
src/StepVisual/StepVisual_StyledItem.hxx
src/Transfer/Transfer_Binder.cxx
src/Transfer/Transfer_Binder.hxx
src/Transfer/Transfer_SimpleBinderOfTransient.cxx
src/XCAFDoc/XCAFDoc_ShapeTool.cxx
src/XCAFDoc/XCAFDoc_ShapeTool.hxx
src/XDEDRAW/XDEDRAW_Common.cxx
tests/perf/de/begin
tests/perf/de/bug29830_1 [new file with mode: 0644]
tests/perf/de/bug29830_2 [new file with mode: 0644]
tests/perf/de/bug29830_3 [new file with mode: 0644]
tests/perf/de/bug29830_dir/script [new file with mode: 0644]