View Issue Details

IDProjectCategoryView StatusLast Update
0024572Open CASCADEOCCT:Modeling Algorithmspublic2014-11-11 12:52
ReporterdbpAssigned Toapn  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version6.8.0Fixed in Version6.8.0 
Summary0024572: Improvement performance of BRepExtrema_DistShapeShape
DescriptionBRepExtrema_DistShapeShape can be optimized by caching reusable data and reorganizing some calculations.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024123 closedbugmaster Create debug OpenGL context when requested (GL_ARB_debug_output) 

Activities

dbp

2014-03-12 00:06

developer   ~0028206

Performance results:

Intel Core i5-2400 CPU @ 3.1 GHz | 16 GB RAM

=============================================================================
 Test shape | Points | Master | + Caching | + Sorting |
=============================================================================
 Top.brep | 5376 | 15.859 sec | 7.3046 sec | 5.8488 sec |
-----------------------------------------------------------------------------
 Fuse.brep | 41334 | 7.1894 sec | 5.3456 sec | 4.7369 sec |
-----------------------------------------------------------------------------
 Hammer.brep | 3412 | 19.075 sec | 18.406 sec | 16.753 sec |
-----------------------------------------------------------------------------
 Bottom.brep | 8328 | 30.260 sec | 15.526 sec | 12.711 sec |
-----------------------------------------------------------------------------
 Propeller.rle | 6528 | 36.830 sec | 16.340 sec | 15.497 sec |
=============================================================================

dbp

2014-03-12 11:03

developer   ~0028214

Dear kgv,

please review the path in branch CR24572.

kgv

2014-03-14 08:56

developer   ~0028269

Dear dbp,

minor corrections have been pushed to the branch.
Please consider usage of NCollection_Vector instead of std::vector in this case.

"TestExtremaSS Shape Step [Flag { MIN = 0 | MAX = 1 | MINMAX = 2 }]",

The command name does not match other commands within plugin.
Moreover it looks like pure synthetic test, please consider moving it to TKQADraw and name it with bug name. Several test cases using this command could be added.

dbp

2014-03-17 12:57

developer   ~0028296

Dear kgv,

the new version of patch is ready (CR24572_1). Please, review.

kgv

2014-03-17 14:24

developer   ~0028299

Dear bugmaster,

please test the patch.

mkv

2014-03-19 10:28

tester   ~0028342

Dear BugMaster,

Branch CR24572_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 226435404dbd07452d348087ebbd9b1936a31c8a

There are compilation errors on Linux platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24572_1/job/mnt-CR24572_1-master_build_occt_linux/1/parsed_console/?
from ../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:42:
/usr/include/c++/4.4/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:78: error: expected initializer before ‘<’ token
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:81: error: ‘BRepExtrema_CheckPair’ was not declared in this scope
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:81: error: template argument 1 is invalid
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx: In member function ‘void BRepExtrema_DistShapeShape::DistanceMapMap(const TopTools_IndexedMapOfShape&, const TopTools_IndexedMapOfShape&, const Bnd_SeqOfBox&, const Bnd_SeqOfBox&)’:
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:123: error: ‘BRepExtrema_CheckPair’ was not declared in this scope
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:123: error: template argument 1 is invalid
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:123: error: invalid type in declaration before ‘;’ token
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:136: error: request for member ‘Append’ in ‘aPairList’, which is of non-class type ‘int’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:141: error: ‘BRepExtrema_CheckPair’ cannot appear in a constant-expression
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:141: error: template argument 1 is invalid
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:141: error: ‘BRepExtrema_CheckPair’ cannot appear in a constant-expression
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:141: error: template argument 1 is invalid
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:141: error: template argument 2 is invalid
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:141: error: invalid type in declaration before ‘(’ token
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:142: error: ‘BRepExtrema_CheckPair’ cannot appear in a constant-expression
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:142: error: template argument 1 is invalid
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:142: error: request for member ‘Size’ in ‘aPairList’, which is of non-class type ‘int’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:142: error: initializer expression list treated as compound expression
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:144: error: request for member ‘Size’ in ‘aPairList’, which is of non-class type ‘int’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:146: error: ‘get’ is not a member of ‘std’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:146: error: request for member ‘Value’ in ‘aPairList’, which is of non-class type ‘int’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:151: error: ‘get’ is not a member of ‘std’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:151: error: request for member ‘Value’ in ‘aPairList’, which is of non-class type ‘int’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:152: error: ‘get’ is not a member of ‘std’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:152: error: request for member ‘Value’ in ‘aPairList’, which is of non-class type ‘int’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:154: error: ‘get’ is not a member of ‘std’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:154: error: request for member ‘Value’ in ‘aPairList’, which is of non-class type ‘int’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:155: error: ‘get’ is not a member of ‘std’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:155: error: request for member ‘Value’ in ‘aPairList’, which is of non-class type ‘int’

There are compilation errors on Windows platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24572_1/job/mnt-CR24572_1-master_build_occt_windows/1/parsed_console/?

dbp

2014-03-31 11:14

developer   ~0028556

Dear kgv,

Compilation issues were fixed. Please review (branch CR24572_1).

kgv

2014-03-31 11:47

developer   ~0028558

Please test patch.

mkv

2014-03-31 18:47

tester   ~0028569

Dear kgv,
could you please rebase branch CR24572_1, there are conflict files.

dbp

2014-03-31 19:50

developer   ~0028571

Dear kgv,

the path was rebased on current master (CR24572_2).

kgv

2014-04-01 08:45

developer   ~0028574

Please test branch CR24572_3.

mkv

2014-04-01 15:41

tester   ~0028591

Dear BugMaster,

Branch CR24572_3 (and products from GIT master) was compiled on Linux and Windows platforms.
SHA-1: 78d932fc9790581986a8b67604c380e592e37a75

Tere are compilation errors on Linux platform:

http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24572_3/job/mnt-CR24572_3-master_build_occt_linux/1/parsed_console/?

../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:96: error: specialization of ‘template<class TheItemType> class NCollection_Comparator’ in different namespace
../../../../inc/NCollection_Comparator.hxx:29: error: from definition of ‘template<class TheItemType> class NCollection_Comparator’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:100: error: definition of ‘Standard_Boolean NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>::IsLower(const<unnamed>::BRepExtrema_CheckPair&, const<unnamed>::BRepExtrema_CheckPair&) const’ is not in namespace enclosing ‘NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:105: error: definition of ‘Standard_Boolean NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>::IsGreater(const<unnamed>::BRepExtrema_CheckPair&, const<unnamed>::BRepExtrema_CheckPair&) const’ is not in namespace enclosing ‘NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:110: error: definition of ‘Standard_Boolean NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>::IsEqual(const<unnamed>::BRepExtrema_CheckPair&, const<unnamed>::BRepExtrema_CheckPair&) const’ is not in namespace enclosing ‘NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:115: error: definition of ‘Standard_Boolean NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>::IsLowerEqual(const<unnamed>::BRepExtrema_CheckPair&, const<unnamed>::BRepExtrema_CheckPair&) const’ is not in namespace enclosing ‘NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>’
../../../../src/BRepExtrema/BRepExtrema_DistShapeShape.cxx:120: error: definition of ‘Standard_Boolean NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>::IsGreaterEqual(const<unnamed>::BRepExtrema_CheckPair&, const<unnamed>::BRepExtrema_CheckPair&) const’ is not in namespace enclosing ‘NCollection_Comparator<<unnamed>::BRepExtrema_CheckPair>’

dbp

2014-04-02 13:15

developer   ~0028623

Dear kgv,

the patch was fixed and checked with GCC (CR24572_3).

kgv

2014-04-02 13:48

developer   ~0028625

Please test the patch.

mkv

2014-04-03 10:14

tester   ~0028644

Dear BugMaster,

Branch CR24572_3 (and products from GIT master) was compiled on Linux and Windows platforms.
SHA-1: 985994cf64a745890a5439951e8b387653f5b050

Tere are compilation errors on Linux platform:

http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24572_3/job/mnt-CR24572_3-master_build_occt_linux/1/parsed_console/?
In file included from ../../../../inc/TopoDS_Vertex.hxx:20,
from ../../../../inc/BRepExtrema_SolutionElem.hxx:24,
from ../../../../inc/BRepExtrema_SeqOfSolution.hxx:23,
from ../../../../inc/BRepExtrema_DistShapeShape.hxx:18,
from ../../../../src/QADraw/QADraw.cxx:37:
../../../../inc/TopoDS_Shape.hxx:131: error: expected unqualified-id before numeric constant
../../../../inc/TopoDS_Shape.hxx:134: error: expected unqualified-id before numeric constant
In file included from ../../../../inc/TopoDS_Shape.lxx:17,
from ../../../../inc/TopoDS_Shape.hxx:236,
from ../../../../inc/TopoDS_Vertex.hxx:20,
from ../../../../inc/BRepExtrema_SolutionElem.hxx:24,
from ../../../../inc/BRepExtrema_SeqOfSolution.hxx:23,
from ../../../../inc/BRepExtrema_DistShapeShape.hxx:18,
from ../../../../src/QADraw/QADraw.cxx:37:
../../../../inc/TopoDS_TShape.hxx:91: error: expected unqualified-id before numeric constant
../../../../inc/TopoDS_TShape.hxx:93: error: expected unqualified-id before numeric constant
In file included from ../../../../inc/TopoDS_TShape.hxx:135,
from ../../../../inc/TopoDS_Shape.lxx:17,
from ../../../../inc/TopoDS_Shape.hxx:236,
from ../../../../inc/TopoDS_Vertex.hxx:20,
from ../../../../inc/BRepExtrema_SolutionElem.hxx:24,
from ../../../../inc/BRepExtrema_SeqOfSolution.hxx:23,
from ../../../../inc/BRepExtrema_DistShapeShape.hxx:18,
from ../../../../src/QADraw/QADraw.cxx:37:
../../../../inc/TopoDS_TShape.lxx:179: error: expected unqualified-id before numeric constant
../../../../inc/TopoDS_TShape.lxx:189: error: expected unqualified-id before numeric constant
In file included from ../../../../inc/TopoDS_Shape.hxx:236,
from ../../../../inc/TopoDS_Vertex.hxx:20,
from ../../../../inc/BRepExtrema_SolutionElem.hxx:24,
from ../../../../inc/BRepExtrema_SeqOfSolution.hxx:23,
from ../../../../inc/BRepExtrema_DistShapeShape.hxx:18,
from ../../../../src/QADraw/QADraw.cxx:37:
../../../../inc/TopoDS_Shape.lxx:260: error: expected unqualified-id before numeric constant
../../../../inc/TopoDS_Shape.lxx:270: error: expected unqualified-id before numeric constant

dbp

2014-04-03 14:01

developer   ~0028653

Dear kgv,

possible compilation issue was fixed. Please review (CR24572_3).

kgv

2014-04-03 14:11

developer   ~0028654

Please re-test

mkv

2014-04-03 15:22

tester   ~0028659

Dear BugMaster,

Branch CR24572_3 (and products from GIT master) was compiled on Linux and Windows platforms.
SHA-1: 7f5b543f6f9d9763432b06d6d10018013afcda8e

There are compilation errors on Linux platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24572_3/job/mnt-CR24572_3-master_build_occt_linux/1/parsed_console/?

In file included from /usr/include/GL/glx.h:39,
from ../../../../src/Xw/Xw_Window.cxx:23:
/usr/include/X11/Xutil.h:415: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:421: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:428: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:434: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:442: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:449: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:456: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:470: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:481: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:487: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:493: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:500: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:508: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:534: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:725: error: ‘Status’ does not name a type
/usr/include/X11/Xutil.h:765: error: ‘Status’ does not name a type
In file included from /usr/include/GL/glx.h:336,
from ../../../../src/Xw/Xw_Window.cxx:23:
/usr/include/GL/glxext.h:714: error: typedef ‘Status’ is initialized (use decltype instead)
/usr/include/GL/glxext.h:714: error: ‘PFNGLXGETTRANSPARENTINDEXSUNPROC’ was not declared in this scope
make[2]: *** [Xw_Window.lo] Error 1

dbp

2014-04-03 15:35

developer   ~0028660

Dear kgv,

new version is in branch CR24572.

dbp

2014-04-03 15:39

developer   ~0028661

Last edited: 2014-04-03 15:39

Please re-test path in CR24572.

mkv

2014-04-04 14:10

tester   ~0028681

Dear BugMaster,

Branch CR24572 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 420f70175a013f979da4539c6defed75f7001532

Number of compiler warnings:

occt component :
Linux: 27 (27 on master)
Windows: 0 (0 on master)

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 394773564 / 393242136
Total CPU difference: 50709.24999999982 / 57189.309999999896

Testing on Windows:
Total MEMORY difference: 422643780 / 414066652
Total CPU difference: 34446.34375 / 39807.578125

There are no differences in images found by testdiff.

Related Changesets

occt: master 762b6cec

2014-04-10 13:42:41

dbp


Committer: apn Details Diff
0024572: Improvement performance of BRepExtrema_DistShapeShape

Fix compilations issues.
Fix compilation issues with GCC.
Affected Issues
0024572
mod - src/BRepExtrema/BRepExtrema_DistShapeShape.cxx Diff File
mod - src/BRepExtrema/BRepExtrema_DistShapeShape.hxx Diff File
mod - src/BRepTest/BRepTest_ExtremaCommands.cxx Diff File
mod - src/QADraw/QADraw.cxx Diff File

Issue History

Date Modified Username Field Change
2014-01-24 18:21 dbp New Issue
2014-01-24 18:21 dbp Assigned To => ifv
2014-01-24 18:21 dbp Assigned To ifv => dbp
2014-03-12 00:06 dbp Note Added: 0028206
2014-03-12 11:03 dbp Note Added: 0028214
2014-03-12 11:03 dbp Assigned To dbp => kgv
2014-03-12 11:03 dbp Status new => resolved
2014-03-14 08:56 kgv Note Added: 0028269
2014-03-14 08:56 kgv Assigned To kgv => dbp
2014-03-14 08:56 kgv Status resolved => assigned
2014-03-17 12:57 dbp Note Added: 0028296
2014-03-17 12:57 dbp Assigned To dbp => kgv
2014-03-17 12:57 dbp Status assigned => resolved
2014-03-17 14:24 kgv Note Added: 0028299
2014-03-17 14:24 kgv Assigned To kgv => bugmaster
2014-03-17 14:24 kgv Status resolved => reviewed
2014-03-18 21:19 mkv Assigned To bugmaster => mkv
2014-03-19 10:28 mkv Note Added: 0028342
2014-03-19 10:29 mkv Assigned To mkv => dbp
2014-03-19 10:29 mkv Status reviewed => assigned
2014-03-31 11:14 dbp Note Added: 0028556
2014-03-31 11:14 dbp Assigned To dbp => kgv
2014-03-31 11:14 dbp Status assigned => resolved
2014-03-31 11:47 kgv Note Added: 0028558
2014-03-31 11:47 kgv Assigned To kgv => bugmaster
2014-03-31 11:47 kgv Status resolved => reviewed
2014-03-31 11:47 kgv Target Version => 6.7.1
2014-03-31 18:47 mkv Note Added: 0028569
2014-03-31 18:48 mkv Assigned To bugmaster => kgv
2014-03-31 18:48 mkv Status reviewed => feedback
2014-03-31 18:58 kgv Assigned To kgv => dbp
2014-03-31 19:50 dbp Note Added: 0028571
2014-03-31 19:50 dbp Assigned To dbp => kgv
2014-03-31 19:50 dbp Status feedback => resolved
2014-04-01 08:45 kgv Note Added: 0028574
2014-04-01 08:45 kgv Assigned To kgv => bugmaster
2014-04-01 08:45 kgv Status resolved => reviewed
2014-04-01 12:56 mkv Assigned To bugmaster => mkv
2014-04-01 15:41 mkv Note Added: 0028591
2014-04-01 15:42 mkv Assigned To mkv => dbp
2014-04-01 15:42 mkv Status reviewed => assigned
2014-04-02 13:15 dbp Note Added: 0028623
2014-04-02 13:15 dbp Assigned To dbp => kgv
2014-04-02 13:15 dbp Status assigned => resolved
2014-04-02 13:48 kgv Note Added: 0028625
2014-04-02 13:48 kgv Assigned To kgv => bugmaster
2014-04-02 13:48 kgv Status resolved => reviewed
2014-04-02 14:38 mkv Assigned To bugmaster => mkv
2014-04-03 10:14 mkv Note Added: 0028644
2014-04-03 10:16 mkv Assigned To mkv => dbp
2014-04-03 10:16 mkv Status reviewed => assigned
2014-04-03 14:01 dbp Note Added: 0028653
2014-04-03 14:01 dbp Assigned To dbp => kgv
2014-04-03 14:01 dbp Status assigned => resolved
2014-04-03 14:11 kgv Note Added: 0028654
2014-04-03 14:11 kgv Assigned To kgv => bugmaster
2014-04-03 14:11 kgv Status resolved => reviewed
2014-04-03 14:53 mkv Assigned To bugmaster => mkv
2014-04-03 15:04 kgv Relationship added related to 0024123
2014-04-03 15:22 mkv Note Added: 0028659
2014-04-03 15:23 mkv Assigned To mkv => dbp
2014-04-03 15:23 mkv Status reviewed => assigned
2014-04-03 15:35 dbp Note Added: 0028660
2014-04-03 15:35 dbp Assigned To dbp => kgv
2014-04-03 15:35 dbp Status assigned => resolved
2014-04-03 15:39 dbp Note Added: 0028661
2014-04-03 15:39 dbp Assigned To kgv => bugmaster
2014-04-03 15:39 dbp Status resolved => reviewed
2014-04-03 15:39 dbp Note Edited: 0028661
2014-04-03 16:07 mkv Assigned To bugmaster => mkv
2014-04-04 14:10 mkv Note Added: 0028681
2014-04-04 16:26 abv Target Version 6.7.1 => 6.8.0
2014-04-04 17:31 mkv Test case number => Not needed
2014-04-04 17:31 mkv Assigned To mkv => bugmaster
2014-04-04 17:31 mkv Status reviewed => tested
2014-04-11 14:43 apn Changeset attached => occt master 762b6cec
2014-04-11 14:43 apn Assigned To bugmaster => apn
2014-04-11 14:43 apn Status tested => verified
2014-04-11 14:43 apn Resolution open => fixed
2014-11-11 12:47 aiv Fixed in Version => 6.8.0
2014-11-11 12:52 aiv Status verified => closed