0029830: STEPCAFControl_Reader poor performance - quadratic dependence
authormsv <msv@opencascade.com>
Fri, 1 Jun 2018 11:38:39 +0000 (14:38 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 20 Jul 2018 14:15:53 +0000 (17:15 +0300)
commit63cdf48ec1e3e55fdebf40292ecca39e4ff9c07f
treedb6736912be20583d684925cf0ad3ffa4d204605
parent0a96e0bbc4c529db4d0185c938df5b2a5d89f5c6
0029830: STEPCAFControl_Reader poor performance - quadratic dependence

Various performance improvements in STEP read/write algorithms:
- Search for the  label of a shape or component shape is improved using map mechanism instead of brute force iteration.
- Invariant FindEntities() is moved out of the loop in the method getStyledItem in STEPCAFControl/STEPCAFControl_Writer.cxx.
- A pointer to the end of binders chain is added in Transfer_Binder class to speed up adding a binder to the chain.
- Small fixes are added  to eliminate excess copying of handles, calls of handle DownCasts and so on.

Stack overflow is removed during destruction of STEP model with long chains of Transfer_Binder.
It is 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).

Performance test cases for STEP reading/writing have been added.
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]