View Issue Details

IDProjectCategoryView StatusLast Update
0028404Open CASCADEOCCT:DRAWpublic2017-09-29 16:24
ReporterabvAssigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028404: DRAW - avoid useless preparation of display data when shape is not shown
DescriptionExecution of complex scripts is often quite slow in DRAW due to overhead expenses occurring when shape is set as DRAW variable. This includes display of the shape in DRAW views, and some pre-processing that is required for that.

The first problem is that constructor of the class DBRep_DrawableShape performs pre-processing of shape data and prepares some display structures even if there are no views opened, or the shape is not shown. This overhead cannot be avoided.

For instance, execution of attached script creating deep nested compound from single box (~ 93 K instances) runs in ~ 400 sec on current master, and all this time is taken by updating those useless structures.

Another problem is that when one or more DRAW view(s) are opened, by default every new shape gets displayed automatically. This takes time but may be not always needed. Note that there is a DRAW command "autodisplay" that allows to switch this behavior off or on. It should be used to avoid automatic display of shapes created by scripts.
Steps To Reproducetest perf draw bug28404
TagsNo tags attached.
Test case numberperf draw bug28404

Attached Files

  • deepcompound.tcl (863 bytes)

Activities

abv

2017-01-29 23:03

manager  

deepcompound.tcl (863 bytes)

git

2017-01-29 23:24

administrator   ~0063166

Branch CR28404 has been created by abv.

SHA-1: 4f6c429ad697d4669d228134befabcbec5c201aa


Detailed log of new commits:

Author: abv
Date: Sun Jan 29 23:23:49 2017 +0300

    0028404: DRAW is slow
    
    Class DBRep_DrawableShape is changed to postpone generation of display data until the shape is actually displayed (for the first time).
    
    Test perf draw bug28404 is added.

git

2017-01-30 07:56

administrator   ~0063169

Branch CR28404 has been updated forcibly by abv.

SHA-1: 11fbd849b86949acbcbaa66a8c35f729f41177e2

abv

2017-01-30 07:57

manager   ~0063170

Fix is pushed to CR28404, please review

apn

2017-01-30 20:23

administrator   ~0063226

There are no remarks.

mkv

2017-02-02 13:11

tester   ~0063355

Dear BugMaster,
Branch CR28404 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 11fbd849b86949acbcbaa66a8c35f729f41177e2

Number of compiler warnings:

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

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1141

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28404-master-OCCT/Debian70-64/perf/draw/bug28404.html
http://occt-tests/CR28404-master-OCCT/Windows-64-VC10/perf/draw/bug28404.html
perf draw bug28404: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91818142 / 92310743 [-0.53%]
Total CPU difference: 19764.46000000039 / 19914.260000000217 [-0.75%]
products component :
Total MEMORY difference: 30867730 / 31477908 [-1.94%]
Total CPU difference: 5517.409999999976 / 5544.959999999981 [-0.50%]

Testing on Windows:
occt component :
Total MEMORY difference: 57087473 / 57618048 [-0.92%]
Total CPU difference: 18200.97987219849 / 18683.178963198647 [-2.58%]
products component :
Total MEMORY difference: 22203455 / 22621210 [-1.85%]
Total CPU difference: 5539.829511499975 / 5570.546108399986 [-0.55%]

There are no differences in images found by testdiff.

mkv

2017-02-02 13:11

tester   ~0063356

Dear BugMaster,
Branch CR28404 is TESTED.

git

2017-02-08 11:36

administrator   ~0063633

Branch CR28404 has been deleted by kgv.

SHA-1: 11fbd849b86949acbcbaa66a8c35f729f41177e2

Related Changesets

occt: master 6662fe63

2017-01-29 20:23:49

abv


Committer: apn Details Diff
0028404: DRAW - avoid useless preparation of display data when shape is not shown

Class DBRep_DrawableShape is changed to postpone generation of display data until the shape is actually displayed (for the first time).

Test perf draw bug28404 is added.
Affected Issues
0028404
mod - src/DBRep/DBRep_DrawableShape.cxx Diff File
mod - src/DBRep/DBRep_DrawableShape.hxx Diff File
add - tests/perf/draw/bug28404 Diff File
mod - tests/perf/grids.list Diff File

Issue History

Date Modified Username Field Change
2017-01-29 23:03 abv New Issue
2017-01-29 23:03 abv Assigned To => apn
2017-01-29 23:03 abv File Added: deepcompound.tcl
2017-01-29 23:17 abv Description Updated
2017-01-29 23:24 git Note Added: 0063166
2017-01-29 23:25 abv Description Updated
2017-01-30 07:21 abv Summary DRAW is slow => DRAW - avoid useless preparation of display data when shape is not shown
2017-01-30 07:21 abv Description Updated
2017-01-30 07:56 git Note Added: 0063169
2017-01-30 07:57 abv Note Added: 0063170
2017-01-30 07:57 abv Status new => resolved
2017-01-30 07:57 abv Steps to Reproduce Updated
2017-01-30 20:23 apn Note Added: 0063226
2017-01-30 20:23 apn Test case number => perf draw bug28404
2017-01-30 20:23 apn Assigned To apn => bugmaster
2017-01-30 20:23 apn Status resolved => reviewed
2017-01-31 11:45 mkv Assigned To bugmaster => mkv
2017-02-02 13:11 mkv Note Added: 0063355
2017-02-02 13:11 mkv Note Added: 0063356
2017-02-02 13:11 mkv Assigned To mkv => bugmaster
2017-02-02 13:11 mkv Status reviewed => tested
2017-02-03 16:52 apn Changeset attached => occt master 6662fe63
2017-02-03 16:52 apn Assigned To bugmaster => apn
2017-02-03 16:52 apn Status tested => verified
2017-02-03 16:52 apn Resolution open => fixed
2017-02-08 11:36 git Note Added: 0063633
2017-09-29 16:21 aiv Fixed in Version => 7.2.0
2017-09-29 16:24 aiv Status verified => closed