MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029830Open CASCADE[OCCT] OCCT:Data Exchangepublic2018-06-01 09:392018-06-13 10:27
Reportermsv 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusresolvedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0029830: Data Exchange, STEPCAFControl_Reader poor performance - quadratic dependence
DescriptionThis class performs very slow while reading models with big number of parts. It has quadratic dependence of time on the number of parts during setting colors to shapes. It iterates on all read shapes, and calls the method SetColor of XCAFDoc_ColorTool, which in its turn searches for the shape in the document by brute force iterations.

It is needed to use the mechanism of searching shapes by the data map (the method SearchUsingMap from XCAFDoc_ShapeTool), how it is done in the class IGESCAFControl_Reader.

The sample files to reproduce the issue are very big and cannot be loaded here. They can be found in the local network storage //master/projects/HybridProduct/data_nobackup/.
Steps To Reproduce
chrono h reset start
ReadStep d ALL_AREA01.step
chrono h stop show
#CPU user time: 131.40625 seconds

chrono h reset start
ReadStep d ALL.step
chrono h stop show
#CPU user time: 1338.671875 seconds
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0023974feedbackbugmaster Optimization of convertation to STEP. 
related to 0023979assignedgka Performance problem of STEP export for large files 

-  Notes
(0076522)
git (administrator)
2018-06-01 14:38

Branch CR29830 has been created by msv.

SHA-1: fb04c5f4b4941b14df79f2724cebd989c90c2161


Detailed log of new commits:

Author: msv
Date: Fri Jun 1 14:38:39 2018 +0300

    0029830: STEPCAFControl_Reader poor performance - quadratic dependence
    
    The issue has been solved by using the call to SearchUsingMap() in order to quickly find the label of the shape.
(0076523)
msv (developer)
2018-06-01 15:03
edited on: 2018-06-01 15:04

The fix allows speeding up the reading as follows:
ALL_AREA01.step: 59 vs 131 s
ALL.step: 325 vs 1338 s

(0076526)
msv (developer)
2018-06-01 16:26

Please review the fix.
(0076527)
msv (developer)
2018-06-01 16:27

Test results http://jenkins-test-11.nnov.opencascade.com:8080/view/CR29830-master-msv/view/COMPARE/. [^]
(0076582)
abv (manager)
2018-06-04 12:25

No remarks, please proceed
(0076591)
bugmaster (administrator)
2018-06-04 15:04

Combination -
OCCT branch : CR29830 SHA - fb04c5f4b4941b14df79f2724cebd989c90c2161
Products branch : master SHA - 69b1ea63c0a20d2e45aff1ec3b661e6b0ce68eac
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 17074.939999999857 / 17011.039999999866 [+0.38%]
Products
Total CPU difference: 7413.420000000049 / 7351.93000000003 [+0.84%]
Windows-64-VC10:
OCCT
Total CPU difference: 16749.12536549862 / 16821.806231398525 [-0.43%]
Products
Total CPU difference: 8081.772205899864 / 8072.068943699895 [+0.12%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0076592)
pdn (developer)
2018-06-04 15:05

Please ask test case from MSV
(0076633)
git (administrator)
2018-06-06 12:20

Branch CR29830 has been updated by msv.

SHA-1: 7500ee44537d4e68b75d21fe3168d7e3dbfc9111


Detailed log of new commits:

Author: msv
Date: Wed Jun 6 12:19:35 2018 +0300

    Make it possible to use ReadStep and WriteStep to read/write from the session without accessing the disk file.

(0076634)
git (administrator)
2018-06-06 12:27

Branch CR29830 has been updated forcibly by msv.

SHA-1: 243f45cfe9b50124722c096af8b46ca207654089
(0076635)
git (administrator)
2018-06-06 12:30

Branch CR29830 has been updated forcibly by msv.

SHA-1: 6f17ba381b3675d53c140ba14b42bee2f8531df8
(0076655)
git (administrator)
2018-06-07 11:20

Branch CR29830 has been updated forcibly by msv.

SHA-1: bc5a0072905ebec8d7930d6dfccfb9d1db1d4b66
(0076665)
git (administrator)
2018-06-07 17:07

Branch CR29830 has been updated forcibly by msv.

SHA-1: ea171d917a43b2c3500ed27421c9acc9eafcbb57
(0076705)
git (administrator)
2018-06-09 16:47

Branch CR29830_1 has been created by msv.

SHA-1: 92ad3ea161efe1b64a2de662515a53256cdecb25


Detailed log of new commits:

Author: msv
Date: Fri Jun 1 14:38:39 2018 +0300

    0029830: STEPCAFControl_Reader poor performance - quadratic dependence
    
    Various performance improvements have been made in the algorithms of STEP read/write:
    
    - Using the call to XCAFDoc_ShapeTool::SearchUsingMap() in STEPCAFControl_Reader::ReadColors() in order to quickly find the label of the shape.
    - Place the label of a component to the map in order to avoid iteration on all components to find a label of a component shape. It is done both in XCAFDoc_ShapeTool and in STEPCAFControl_Reader.
    - Using the map ShapeLabelMap in the method STEPCAFControl_Reader::FindInstance() to avoid iteration on components.
    - Move invariant FindEntities() out of the loop in the method getStyledItem in STEPCAFControl/STEPCAFControl_Writer.cxx.
    - Small fixes connected with elimination of excess copying of handles, calls of handle DownCasts and so on.
    - Add pointer to the end of binders chain to the Transfer_Binder class in order to speed up adding a binder to the chain.
    
    Remove stack overflow during destruction of STEP model with long chains of Transfer_Binder.
    
    Make it 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).
    
    Add performance test cases for STEP reading/writing.
(0076706)
msv (developer)
2018-06-09 16:51

Dear Pavel, please review CR29830_1.
The tests are being computed now in CR29830-master-msv.
(0076713)
msv (developer)
2018-06-09 18:39

I have found the new warning on Debian with this patch:

Transfer_ProcessForFinder.hxx:250, GNU C Compiler 4 (gcc), Priority: Normal
dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(0076714)
git (administrator)
2018-06-09 18:48

Branch CR29830_1 has been updated by msv.

SHA-1: 842140f9ad8c60fc5469dc5bad3f0857f675cec1


Detailed log of new commits:

Author: msv
Date: Sat Jun 9 18:47:11 2018 +0300

    #Correct warning

(0076715)
msv (developer)
2018-06-09 18:49

Tests have been restarted.
(0076716)
git (administrator)
2018-06-09 19:57

Branch CR29830_1 has been updated forcibly by msv.

SHA-1: c77684b867567a1f3b655ccd2ced28c9d2fde8bb
(0076717)
git (administrator)
2018-06-09 20:21

Branch CR29830_1 has been updated forcibly by msv.

SHA-1: 0419c5d0afec08783099a72363e9e607d643a96e
(0076730)
msv (developer)
2018-06-13 09:55

Tests have been passed OK. Please review the patch.

- Issue History
Date Modified Username Field Change
2018-06-01 09:39 msv New Issue
2018-06-01 09:39 msv Assigned To => msv
2018-06-01 14:38 git Note Added: 0076522
2018-06-01 14:42 msv Status new => assigned
2018-06-01 15:01 msv Description Updated View Revisions
2018-06-01 15:01 msv Steps to Reproduce Updated View Revisions
2018-06-01 15:02 kgv Summary STEPCAFControl_Reader poor performance - quadratic dependence => Data Exchange, STEPCAFControl_Reader poor performance - quadratic dependence
2018-06-01 15:02 kgv Steps to Reproduce Updated View Revisions
2018-06-01 15:03 msv Note Added: 0076523
2018-06-01 15:04 msv Note Edited: 0076523 View Revisions
2018-06-01 16:26 msv Note Added: 0076526
2018-06-01 16:26 msv Assigned To msv => abv
2018-06-01 16:26 msv Status assigned => resolved
2018-06-01 16:27 msv Note Added: 0076527
2018-06-04 12:25 abv Note Added: 0076582
2018-06-04 12:25 abv Assigned To abv => bugmaster
2018-06-04 12:25 abv Status resolved => reviewed
2018-06-04 15:00 bugmaster Test case number => Not needed
2018-06-04 15:04 bugmaster Note Added: 0076591
2018-06-04 15:04 bugmaster Status reviewed => tested
2018-06-04 15:05 pdn Note Added: 0076592
2018-06-05 15:55 msv Assigned To bugmaster => msv
2018-06-05 15:55 msv Status tested => assigned
2018-06-06 12:20 git Note Added: 0076633
2018-06-06 12:27 git Note Added: 0076634
2018-06-06 12:30 git Note Added: 0076635
2018-06-07 11:20 git Note Added: 0076655
2018-06-07 17:07 git Note Added: 0076665
2018-06-09 15:01 msv Relationship added related to 0023974
2018-06-09 16:06 msv Relationship added related to 0023979
2018-06-09 16:47 git Note Added: 0076705
2018-06-09 16:51 msv Note Added: 0076706
2018-06-09 16:51 msv Assigned To msv => pdn
2018-06-09 16:51 msv Status assigned => resolved
2018-06-09 18:39 msv Note Added: 0076713
2018-06-09 18:48 git Note Added: 0076714
2018-06-09 18:49 msv Note Added: 0076715
2018-06-09 19:57 git Note Added: 0076716
2018-06-09 20:21 git Note Added: 0076717
2018-06-13 09:55 msv Note Added: 0076730
2018-06-13 10:27 pdn Assigned To pdn => abv


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker