View Issue Details

IDProjectCategoryView StatusLast Update
0026220Open CASCADEOCCT:Visualizationpublic2015-10-23 20:51
ReporterdbpAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version6.9.1Fixed in Version6.9.1 
Summary0026220: Visualization - In Graphic3d_Structure use single NCollection_IndexedMap instead of NCollection_DataMap and NCollection_Sequence
DescriptionRemoving descendant/ancestor structures from Graphic3d_Structure is slow due to the use of NCollection_Sequence. Additional NCollection_DataMap does not solve this problem completely and requires extra memory. It is necessary to switch to more appropriate NCollection_IndexedMap.
Steps To Reproducepload MODELING VISUALIZATION
psphere s 0.5
tclean s
incmesh s 0.1
trinfo s

vinit View1
vclear
vaxo
vsetdispmode 1
vdefaults -defl 1.0 -autoTriang off
vdisplay s

# disable output of commands
decho off

set aNb1 300

# display 300x300 connected instances of single presentation
puts "Creating [expr $aNb1*$aNb1] instances..."
set t [time {for {set i 0} {$i < $aNb1} {incr i} {for {set j 0} {$j < $aNb1} {incr j} {vconnectto s_${i}_${j} ${i} ${j} 0 s -noupdate}}}]
set d1 [lindex $t 0]
puts "Done in $d1 microseconds!\n"

# this command is slow
vclear
TagsNo tags attached.
Test case numberbugs vis bug26199

Relationships

related to 0026199 closedbugmaster Visualization - use NCollection_IndexedMap instead of NCollection_Sequence in OpenGl_BVHClipPrimitiveSet to improve performance 
related to 0026029 closedabv Visualization - Poor performance of connected objects 
related to 0026221 closedbugmaster Visualization - use NCollection_IndexedMap instead of NCollection_Sequence in OpenGl_Layer to improve performance 

Activities

git

2015-05-13 18:39

administrator   ~0040865

Branch CR26220 has been created by dbp.

SHA-1: e8f048632f81c51689f7554ad8da9ceb3de325b7


Detailed log of new commits:

Author: dbp
Date: Wed May 13 18:36:17 2015 +0300

    0026220: Visualization - In Graphic3d_Structure use single NCollection_IndexedMap instead of NCollection_DataMap and NCollection_Sequence

dbp

2015-05-13 18:44

developer   ~0040866

Dear san,

please review the patch in branch CR26220.

The case of many connected objects was optimized in terms of performance and memory consumption. E.g., for 90 000 sphere (see test case) 'vclear' operation takes:

master: 90 secs
patch: 30 secs (3x)

Currently, Graphic3d_Structure has no bottlenecks in terms of addition or removing structures. However, profiling showed that another bottleck is located in OpenGl_Layer::Remove() method (it is also uses NCollection_Sequence).

git

2015-05-14 12:15

administrator   ~0040892

Branch CR26220_1 has been created by dbp.

SHA-1: fa2f32a806de11013b6f4e6cedf7b988db834776


Detailed log of new commits:

Author: dbp
Date: Thu May 14 12:14:40 2015 +0300

    0026220: Visualization - In Graphic3d_Structure use single NCollection_IndexedMap instead of NCollection_DataMap and NCollection_Sequence

dbp

2015-05-14 12:16

developer   ~0040893

Dear san,

the re-based branch (wwith fixes Swap) was pushed in CR26220_1.

san

2015-05-14 18:30

developer   ~0041153

Branch CR26220_1 reviewed without remarks, ready for testing.

git

2015-05-15 18:09

administrator   ~0041196

Branch CR26220_1 has been updated forcibly by apv.

SHA-1: 7f898397a7fe7ef0faa88d8c4bb7ea2718d52973

apv

2015-05-15 18:09

tester   ~0041197

Branch CR26220_1 has been rebased on the current master

apv

2015-05-19 15:09

tester   ~0041281

Dear BugMaster,

Branch CR26220_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 7f898397a7fe7ef0faa88d8c4bb7ea2718d52973

Number of compiler warnings:
occt component:
   Linux: 18
   Windows: 0
products component:
   Linux: 4
   Windows: 0

Regressions/Differences:
Not detected

Testing on Linux:
Total MEMORY difference: 96747698 / 100290561 [-3.53%]
Total CPU difference: 19858.380000001456 / 19415.400000000176 [+2.28%]

Testing on Windows:
Total MEMORY difference: 59223196 / 59274253 [-0.09%]
Total CPU difference: 17051.517703898775 / 16995.79414669895 [+0.33%]

apv

2015-05-19 15:09

tester   ~0041282

Awaiting solution for issue 0026199

git

2015-07-27 13:48

administrator   ~0043549

Branch CR26220 has been deleted by kgv.

SHA-1: e8f048632f81c51689f7554ad8da9ceb3de325b7

git

2015-07-27 13:48

administrator   ~0043550

Branch CR26220_1 has been deleted by kgv.

SHA-1: 7f898397a7fe7ef0faa88d8c4bb7ea2718d52973

Related Changesets

occt: master 602d1ead

2015-05-14 09:14:40

dbp


Committer: bugmaster Details Diff
0026220: Visualization - In Graphic3d_Structure use single NCollection_IndexedMap instead of NCollection_DataMap and NCollection_Sequence Affected Issues
0026220
mod - src/Graphic3d/Graphic3d_IndexedMapOfAddress.hxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.cdl Diff File
mod - src/Graphic3d/Graphic3d_Structure.cxx Diff File

Issue History

Date Modified Username Field Change
2015-05-13 18:35 dbp New Issue
2015-05-13 18:35 dbp Assigned To => dbp
2015-05-13 18:39 git Note Added: 0040865
2015-05-13 18:44 dbp Note Added: 0040866
2015-05-13 18:44 dbp Assigned To dbp => san
2015-05-13 18:44 dbp Status new => resolved
2015-05-13 18:48 dbp Relationship added related to 0026199
2015-05-13 18:48 dbp Relationship added related to 0026029
2015-05-13 18:49 dbp Relationship added related to 0026221
2015-05-14 12:15 git Note Added: 0040892
2015-05-14 12:16 dbp Note Added: 0040893
2015-05-14 18:30 san Note Added: 0041153
2015-05-14 18:30 san Assigned To san => bugmaster
2015-05-14 18:30 san Status resolved => reviewed
2015-05-15 16:19 apv Assigned To bugmaster => apv
2015-05-15 18:09 git Note Added: 0041196
2015-05-15 18:09 apv Note Added: 0041197
2015-05-19 15:07 apv Test case number => bugs vis bug26199
2015-05-19 15:09 apv Note Added: 0041281
2015-05-19 15:09 apv Note Added: 0041282
2015-05-21 13:33 apv Assigned To apv => bugmaster
2015-05-21 13:33 apv Status reviewed => tested
2015-05-22 12:19 bugmaster Changeset attached => occt master 602d1ead
2015-05-22 12:19 bugmaster Status tested => verified
2015-05-22 12:19 bugmaster Resolution open => fixed
2015-07-27 13:48 git Note Added: 0043549
2015-07-27 13:48 git Note Added: 0043550
2015-08-26 11:11 abv Target Version 7.0.0 => 6.9.1
2015-10-16 14:56 aiv Status verified => closed
2015-10-23 20:51 aiv Fixed in Version => 6.9.1