View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026139 | Community | OCCT:Visualization | public | 2015-04-24 12:12 | 2023-09-30 20:27 |
Reporter | solomin_s | Assigned To | |||
Priority | normal | Severity | major | ||
Status | closed | Resolution | fixed | ||
Platform | Lixux | OS | Ubuntu | ||
Product Version | 6.9.0 | ||||
Target Version | 6.9.0 | Fixed in Version | 6.9.0 | ||
Summary | 0026139: AIS_InteractiveContext::Display performance regression | ||||
Description | Displaying AIS_IO now requires more time than earlier. AIS_InteractiveContext::Display spends 95% of time to add AIS_IO to selection manager, 75% of which is spent to find element in NCollection_BaseSequence [see attachments]. NCollection_BaseSequence usage seems to be ineffective to store objects and indexes in SelectMgr_SensitiveEntitySet, because it has a lot of access operations. | ||||
Steps To Reproduce | test bugs vis bug26139 | ||||
Additional information and documentation updates | http://dev.opencascade.org/index.php?q=node/1079 | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
related to | 0024623 | closed | bugmaster | Open CASCADE | Visualization - improve selection mechanism |
related to | 0026199 | closed | bugmaster | Open CASCADE | Visualization - use NCollection_IndexedMap instead of NCollection_Sequence in OpenGl_BVHClipPrimitiveSet to improve performance |
related to | 0026195 | closed | bugmaster | Open CASCADE | Visualization - optimize selection algorithms |
related to | 0026626 | closed | bugmaster | Community | occ 6.9.0 performance loss |
related to | 0033496 | new | dpasukhi | Open CASCADE | Tests - Removing not-relevant performance test |
|
Screenshot from 2015-04-23 19:53:18.png (38,457 bytes) |
|
Screenshot from 2015-04-23 19:55:18.png (41,038 bytes) |
|
times1.png (118,095 bytes) |
|
Replacing NCollection_BaseSequence with std::deque the hotspot has gone and AIS_InteractiveContext::Display has sped up by 2.5x. |
|
Branch CR26139 has been created by solomin_s. SHA-1: 7ca81119e46b375d9bc8adf9130efefc48b0a0d9 Detailed log of new commits: Author: Sergey Solomin Date: Fri Apr 24 23:18:06 2015 +0300 0026139: AIS_InteractiveContext::Display performance regression Replacing NCollection_BaseSequence with std::deque |
|
I've published my changes which give 2.5x speed-up displaying my model. |
|
I believe the class SelectMgr_SensitiveSet and around must be refactored: - there is no sense in maintaining myEntityIdxs sequence, it does not bring anything apart of extra indirection. To sort the objects, you can instead swap them directly in their own container, so that index is always direct. - vector can be used instead of sequence or deque. When removing element from the set, for efficiency it can be first swapped with the last one, then the last removed - in Swap(), use std::swap() - class BVH_Set lacks documentation: at a minimum, it must be indicated whether the index is assumed to be 0- or 1-based. Then, I suppose it should be clearly indicated that its entities are going to be re-sorted regularly (this would be a hint to use data structures with fast random access rather than sequences in implementation of descendants). Even description of template arguments T and N is very vague. If I get it right, T is data type to be used for each coordinate (either double or float), and N is dimension of the space (must be either 2 or 3). The same applies to most of the classes in BVH. |
|
Branch CR26139_1 has been created by vpa. SHA-1: 8a0a41d20f1835cf5bcaaa8600ff14280e6d47dd Detailed log of new commits: Author: vpa Date: Tue Apr 28 01:56:35 2015 +0300 Refactoring of SelectMgr_SensitiveEntitySet |
|
Branch CR26139_1 has been updated by vpa. SHA-1: 7e72082669b1d412e77c2f3334d70c0535767488 Detailed log of new commits: Author: vpa Date: Wed May 6 20:49:42 2015 +0300 Fixed warnings |
|
Branch CR26139_1 has been updated by vpa. SHA-1: d48745b74e2d1e3002b5266bed67b76cb7818d40 Detailed log of new commits: Author: vpa Date: Wed May 6 21:18:43 2015 +0300 Test case for issue 0026139 |
|
Branch CR26139_2 has been created by vpa. SHA-1: 410f65035e52918222d09d0d1a2b2f4459b30d61 Detailed log of new commits: Author: vpa Date: Wed May 6 21:19:35 2015 +0300 0026139: AIS_InteractiveContext::Display performance regression NCollection_Sequence in SelectMgr_SensitiveEntitySet was replaced by data map and vector to provide fast access for BVH |
|
Dear Anton, please review patch from branch CR26139_2. |
|
Dear Mikhail, Reviewed. Please test. |
|
Problem compilation on Windows and Linux platforms http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26139-2-master/job/CR26139-2-master_build_occt_windows_64/ http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26139-2-master/job/CR26139-2-master_build_occt_linux/1/parsed_console/ |
|
Branch CR26139_2 has been updated by abv. SHA-1: d616bf67764278591e2f3da3768a13c393e58f9b Detailed log of new commits: Author: abv Date: Thu May 7 10:23:53 2015 +0300 Minor correction |
|
Correction pushed to CR26139_2, please re-test |
|
Dear Varvara, There are a lot of regressions detected on Linux during testing of CR26139. Full report will be posted after testing on Windows. More information about testing on Linux could be found by the following link: http://occt-tests/CR26139-2-master-occt-64/Debian60-64/summary.html |
|
Branch CR26139_2 has been updated by vpa. SHA-1: 404000cafbb5c42b94de6e2aa6650dc5dffa77c1 Detailed log of new commits: Author: vpa Date: Thu May 7 18:36:16 2015 +0300 Corrections |
|
Branch CR26139_3 has been created by vpa. SHA-1: d85b3dc214a635690360723349928fac55ef065f Detailed log of new commits: Author: vpa Date: Thu May 7 18:39:36 2015 +0300 0026139: AIS_InteractiveContext::Display performance regression NCollection_Sequence in SelectMgr_SensitiveEntitySet was replaced by indexed data map |
|
Add Draw test with stl model (send model to Sergey ANIKIN, because model is cannot be attached to the tracker). I've provided Amplifier screen shots with and without std::deque usage. Occ release with deb info (last git): Draw[4]> pload ALL vinit chrono meshfromstl mesh /home/ssolomin/RL_Extern_NXSpeedBoat.stl 1 Draw[5]> Driver1/Viewer1/View1 Draw[6]> Chronometers activated. Draw[7]> Nodes : 117256 Elements : 235534 Construction is finished Reading OK... Data source is created successful MeshVS_Mesh is created successful Elapsed time: 0 Hours 1 Minutes 0.053043 Seconds CPU user time: 59.64 seconds CPU system time: 0.14 seconds Draw[8]> Elapsed time: 0 Hours 0 Minutes 5.69999999982e-05 Seconds Occ release with deb info (last git + std::deque usage): Draw[4]> pload ALL vinit chrono meshfromstl mesh /home/ssolomin/RL_Extern_NXSpeedBoat.stl1 Draw[5]> Driver1/Viewer1/View1 Draw[6]> Chronometers activated. Draw[7]> Nodes : 117256 Elements : 235534 Construction is finished Reading OK... Data source is created successful MeshVS_Mesh is created successful Elapsed time: 0 Hours 0 Minutes 3.682833 Seconds CPU user time: 3.52 seconds CPU system time: 0.15 seconds Draw[8]> 3D View - Driver1/Viewer1/View1 was deleted. exit |
|
Draw_RL_Extern_NXSpeedBoat.png (28,480 bytes) |
|
Draw_RL_Extern_NXSpeedBoat+deque.png (98,823 bytes) |
|
reproducer.tcl (82 bytes) |
|
Hello, I've found Ncollection_BaseSequence is also bottleneck in OpenGl_BHVClipPrimitives. It became important when big models was displayed. See Big_Model_Times.png. |
|
Big_Model_Times.png (85,294 bytes) |
|
Big_Model_Times_deque.png (48,329 bytes) |
|
Branch CR26139_4 has been created by solomin_s. SHA-1: aa60204badf933323804a6aabb708dd8e3b7b8b3 Detailed log of new commits: Author: Sergey Solomin Date: Fri May 8 13:36:13 2015 +0300 0026139: AIS_InteractiveContext::Display performance regression Replacing NCollection_BaseSequence with std::deque |
|
Branch CR26139 has been deleted by solomin_s. SHA-1: 7ca81119e46b375d9bc8adf9130efefc48b0a0d9 |
|
Dear solomin_s, please take a look at patch in branch CR26139_3, where NCollection_Sequence was replaced by NCollecion_IndexedMap. That change allowed to reduce display time up to 2.5 times and remove time up to 270 times (in comparison to OCCT v6.9.0 beta2). Note that dequeue solution you proposed requires iteration through collection to remove elements, meanwhile indexed map allows to do it in constant time. Regarding to performance of OpenGl_BHVClipPrimitives, the bug will be fixed within issue 0026199. Thanks for your contribution! :) |
|
Branch CR26139_1 has been deleted by inv. SHA-1: d48745b74e2d1e3002b5266bed67b76cb7818d40 |
|
Branch CR26139_2 has been deleted by inv. SHA-1: 404000cafbb5c42b94de6e2aa6650dc5dffa77c1 |
|
Branch CR26139_3 has been deleted by inv. SHA-1: d85b3dc214a635690360723349928fac55ef065f |
|
Branch CR26139_4 has been deleted by inv. SHA-1: aa60204badf933323804a6aabb708dd8e3b7b8b3 |
occt: master ec81011f 2015-05-07 15:39:36
Committer: abv Details Diff |
0026139: AIS_InteractiveContext::Display performance regression NCollection_Sequence in SelectMgr_SensitiveEntitySet was replaced by indexed data map |
Affected Issues 0026139 |
|
mod - src/QABugs/QABugs_19.cxx | Diff File | ||
mod - src/SelectMgr/SelectMgr_SelectableObjectSet.cxx | Diff File | ||
mod - src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx | Diff File | ||
mod - src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx | Diff File | ||
add - tests/bugs/vis/bug26139 | Diff File | ||
occt: master 2cf5ec3f 2015-05-08 10:44:02
Committer: bugmaster Details Diff |
0026139: AIS_InteractiveContext::Display performance regression Regression with VIS tests in release mode was fixed |
Affected Issues 0026139 |
|
mod - src/SelectMgr/SelectMgr_SelectableObjectSet.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-04-24 12:12 | solomin_s | New Issue | |
2015-04-24 12:12 | solomin_s | Assigned To | => kgv |
2015-04-24 12:12 | solomin_s | File Added: Screenshot from 2015-04-23 19:53:18.png | |
2015-04-24 12:13 | solomin_s | File Added: Screenshot from 2015-04-23 19:55:18.png | |
2015-04-24 12:13 | solomin_s | File Added: times1.png | |
2015-04-24 12:15 | solomin_s | Summary | AIS_InteractiveContext::Display is slow => AIS_InteractiveContext::Display performance regression |
2015-04-24 12:15 | solomin_s | Description Updated | |
2015-04-24 12:17 | solomin_s | Note Added: 0040202 | |
2015-04-24 18:02 | kgv | Assigned To | kgv => vpa |
2015-04-24 18:02 | kgv | Status | new => assigned |
2015-04-24 18:03 | kgv | Relationship added | related to 0024623 |
2015-04-24 23:29 | git | Note Added: 0040247 | |
2015-04-24 23:32 | solomin_s | Note Added: 0040248 | |
2015-04-25 07:13 |
|
Note Added: 0040249 | |
2015-04-25 07:15 |
|
Note Edited: 0040249 | |
2015-04-28 10:27 | git | Note Added: 0040315 | |
2015-05-06 20:49 | git | Note Added: 0040681 | |
2015-05-06 21:18 | git | Note Added: 0040687 | |
2015-05-06 21:19 | git | Note Added: 0040688 | |
2015-05-06 21:20 |
|
Note Added: 0040689 | |
2015-05-06 21:20 |
|
Assigned To | vpa => apl |
2015-05-06 21:20 |
|
Status | assigned => resolved |
2015-05-06 21:20 |
|
Steps to Reproduce Updated | |
2015-05-06 21:23 |
|
Note Added: 0040690 | |
2015-05-06 21:23 |
|
Assigned To | apl => mkv |
2015-05-06 21:23 |
|
Status | resolved => reviewed |
2015-05-06 21:24 |
|
Note Edited: 0040690 | |
2015-05-07 07:42 | bugmaster | Note Added: 0040691 | |
2015-05-07 07:42 | bugmaster | Assigned To | mkv => vpa |
2015-05-07 07:42 | bugmaster | Status | reviewed => assigned |
2015-05-07 10:24 | git | Note Added: 0040697 | |
2015-05-07 10:24 |
|
Note Added: 0040698 | |
2015-05-07 10:24 |
|
Assigned To | vpa => kgv |
2015-05-07 10:24 |
|
Status | assigned => resolved |
2015-05-07 10:24 |
|
Assigned To | kgv => bugmaster |
2015-05-07 10:24 |
|
Status | resolved => reviewed |
2015-05-07 11:10 |
|
Assigned To | bugmaster => apv |
2015-05-07 11:53 | kgv | Relationship added | related to 0026195 |
2015-05-07 14:32 |
|
Note Added: 0040735 | |
2015-05-07 14:32 |
|
Assigned To | apv => vpa |
2015-05-07 14:32 |
|
Status | reviewed => assigned |
2015-05-07 18:36 | git | Note Added: 0040766 | |
2015-05-07 18:39 | git | Note Added: 0040767 | |
2015-05-07 19:14 |
|
Status | assigned => resolved |
2015-05-07 19:14 |
|
Assigned To | vpa => bugmaster |
2015-05-07 19:14 |
|
Status | resolved => reviewed |
2015-05-07 19:22 | solomin_s | Note Added: 0040768 | |
2015-05-07 19:22 | solomin_s | File Added: Draw_RL_Extern_NXSpeedBoat.png | |
2015-05-07 19:23 | solomin_s | File Added: Draw_RL_Extern_NXSpeedBoat+deque.png | |
2015-05-07 19:23 | solomin_s | File Added: reproducer.tcl | |
2015-05-08 13:25 | solomin_s | Note Added: 0040774 | |
2015-05-08 13:25 | solomin_s | File Added: Big_Model_Times.png | |
2015-05-08 13:26 | solomin_s | File Added: Big_Model_Times_deque.png | |
2015-05-08 13:37 | git | Note Added: 0040775 | |
2015-05-08 13:37 | git | Note Added: 0040776 | |
2015-05-08 15:01 |
|
Relationship added | related to 0026199 |
2015-05-08 15:19 |
|
Note Added: 0040782 | |
2015-05-08 15:21 |
|
Note Edited: 0040782 | |
2015-05-08 15:22 |
|
Note Edited: 0040782 | |
2015-05-08 15:26 |
|
Note Edited: 0040782 | |
2015-05-08 15:49 | bugmaster | Changeset attached | => occt master 2cf5ec3f |
2015-05-08 15:49 |
|
Changeset attached | => occt master ec81011f |
2015-05-08 15:49 |
|
Assigned To | bugmaster => abv |
2015-05-08 15:49 |
|
Status | reviewed => verified |
2015-05-08 15:49 |
|
Resolution | open => fixed |
2015-05-14 15:28 |
|
Status | verified => closed |
2015-05-14 15:30 |
|
Fixed in Version | => 6.9.0 |
2015-05-14 16:37 | git | Note Added: 0041109 | |
2015-05-14 16:37 | git | Note Added: 0041110 | |
2015-05-14 16:38 | git | Note Added: 0041111 | |
2015-05-14 16:38 | git | Note Added: 0041112 | |
2016-06-25 16:11 | kgv | Relationship added | related to 0026626 |
2023-09-30 20:27 | dpasukhi | Relationship added | related to 0033496 |