MantisBT - Open CASCADE
View Issue Details
0029064Open CASCADE[OCCT] OCCT:Foundation Classespublic2017-08-28 14:272018-06-29 21:19
mpv 
bugmaster 
normalminor 
closedfixed 
[OCCT] 7.1.0 
[OCCT] 7.3.0[OCCT] 7.3.0 
bugs fclasses bug29064
0029064: Copying of empty NCollection map takes excessive memory
  NCollection_Map<int> aMap;
creates a map with myNbBuckets=1 and myData1=NULL, minimum memory is allocated

  NCollection_Map<int> aCopyMap = aMap;
produces a map with myNbBuckets=101 and myData1 referenced to newly allocated 816 bytes

  NCollection_Map<int> aCopyCopyMap = aCopyMap;
does the same, but in addition in "Assign" method it iterates all buckets to try to find elements to copy regardless mySize is 0
.
No tags attached.
Issue History
2017-08-28 14:27mpvNew Issue
2017-08-28 14:27mpvAssigned To => abv
2018-01-10 17:02abvAssigned Toabv => isn
2018-01-10 17:02abvStatusnew => assigned
2018-01-15 22:44gitNote Added: 0073422
2018-01-16 14:20isnAssigned Toisn => msv
2018-01-16 14:20isnStatusassigned => resolved
2018-01-16 14:20isnSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18479#r18479
2018-01-16 19:28gitNote Added: 0073447
2018-01-17 12:42isnNote Added: 0073465
2018-01-17 15:59msvNote Added: 0073478
2018-01-17 15:59msvAssigned Tomsv => isn
2018-01-17 15:59msvStatusresolved => assigned
2018-01-18 14:17gitNote Added: 0073488
2018-01-18 14:22gitNote Added: 0073489
2018-01-18 19:48isnNote Added: 0073497
2018-01-18 19:48isnAssigned Toisn => msv
2018-01-18 19:48isnStatusassigned => resolved
2018-01-19 10:47msvNote Added: 0073510
2018-01-19 10:47msvAssigned Tomsv => isn
2018-01-19 10:47msvStatusresolved => assigned
2018-01-19 14:40gitNote Added: 0073530
2018-01-19 17:24isnNote Added: 0073538
2018-01-19 17:24isnAssigned Toisn => msv
2018-01-19 17:24isnStatusassigned => resolved
2018-01-19 17:25isnAssigned Tomsv => isn
2018-01-19 17:25isnStatusresolved => assigned
2018-01-19 17:37isnAssigned Toisn => msv
2018-01-19 17:37isnStatusassigned => resolved
2018-03-14 14:11abvTarget Version7.4.0* => 7.3.0
2018-03-25 08:41gitNote Added: 0074882
2018-03-25 13:04abvNote Added: 0074887
2018-03-25 13:04abvAssigned Tomsv => bugmaster
2018-03-25 13:04abvStatusresolved => reviewed
2018-03-25 13:18gitNote Added: 0074888
2018-03-25 15:39abvNote Added: 0074890
2018-03-26 15:30bugmasterNote Added: 0074927
2018-03-26 15:30bugmasterStatusreviewed => tested
2018-03-26 15:31bugmasterTest case number => bugs fclasses bug29064
2018-04-11 07:49bugmasterChangeset attached => occt master 229add78
2018-04-11 07:49bugmasterStatustested => verified
2018-04-11 07:49bugmasterResolutionopen => fixed
2018-04-11 11:00gitNote Added: 0075313
2018-04-11 11:00gitNote Added: 0075314
2018-04-11 11:00gitNote Added: 0075315
2018-06-29 21:14aivFixed in Version => 7.3.0
2018-06-29 21:19aivStatusverified => closed

Notes
(0073422)
git   
2018-01-15 22:44   
Branch CR29064 has been created by isn.

SHA-1: c284d392e58eb444a909e6c6ab631bb23adbdc7c


Detailed log of new commits:

Author: isn
Date: Mon Jan 15 20:29:14 2018 +0300

    0029064: Copying of empty NCollection map takes excessive memory
    
    skip resizing of ncollection maps in Assign() methods if given map is empty
(0073447)
git   
2018-01-16 19:28   
Branch CR29064 has been updated forcibly by isn.

SHA-1: d7c4a26c8553c55dab36a849f7283d76099bf828
(0073465)
isn   
2018-01-17 12:42   
/view/CR29064-master-isn/
(0073478)
msv   
2018-01-17 15:59   
src/NCollection/NCollection_DataMap.hxx
src/NCollection/NCollection_DoubleMap.hxx
src/NCollection/NCollection_IndexedDataMap.hxx
src/NCollection/NCollection_IndexedMap.hxx
- Use the variable anExt to avoid calling theOther.Extent() once again.

src/QABugs/QABugs_20.cxx
- Avoid code duplication using template function.

- Add standard header in the scripts.
- The command pload is not needed in the scripts.
- Make a TCL procedure in the 'begin' file that makes all job and checks memory:
proc CheckMemPeak {script max_memory}
and simplify each script as follows:
CheckMemPeak {OCC29064 m} 15000000
(0073488)
git   
2018-01-18 14:17   
Branch CR29064 has been updated by isn.

SHA-1: 63eb499f64d8a54b85d32932f2d8a4648509263a


Detailed log of new commits:

Author: isn
Date: Thu Jan 18 14:16:47 2018 +0300

    corrections

(0073489)
git   
2018-01-18 14:22   
Branch CR29064 has been updated forcibly by isn.

SHA-1: de3371130798b3bb733c1ba47e76a3baae8a4cc3
(0073497)
isn   
2018-01-18 19:48   
test job is same (/view/CR29064-master-isn/)
(0073510)
msv   
2018-01-19 10:47   
Please rebase on current master and retest.
(0073530)
git   
2018-01-19 14:40   
Branch CR29064_1 has been created by isn.

SHA-1: 902ec825e0c8a2039e484991b67c5d7a718e41ec


Detailed log of new commits:

Author: isn
Date: Thu Jan 18 14:16:47 2018 +0300

    corrections

Author: isn
Date: Mon Jan 15 20:29:14 2018 +0300

    0029064: Copying of empty NCollection map takes excessive memory
    
    skip resizing of ncollection maps in Assign() methods if given map is empty
(0073538)
isn   
2018-01-19 17:24   
rebased,
test job is view/CR29064_1-master-isn/
(0074882)
git   
2018-03-25 08:41   
Branch CR29064_2 has been created by abv.

SHA-1: 3dcc67cbe5ea1f61e4ea655b66894e296ff898da


Detailed log of new commits:

Author: isn
Date: Mon Jan 15 20:29:14 2018 +0300

    0029064: Copying of empty NCollection map takes excessive memory
    
    Avoid resizing of NCollection maps in Assign() methods if source map is empty
(0074887)
abv   
2018-03-25 13:04   
Reviewed with amendments, please integrate (branch CR29064_2, test results in Jenkins job CR29064-master-abv).

Some general remarks on implementation of test and DRAWC command:
- For small tests, having single test script is better than several ones (faster, more compact results, easier to control)
- In the code, please use spaces after comma and semicolon, around =, around (but not inside) parentheses and quotes
- Names of function arguments should begin with "the"
- Check availability of the data before using them (in initial implementation DRAW command did not check number of arguments but always used first one)
- In case of wrong arguments, give error message to cout and return 1
(0074888)
git   
2018-03-25 13:18   
Branch CR29064_2 has been updated forcibly by abv.

SHA-1: c33ced0b4f29277d05c56e3a92afd5666db7ae65
(0074890)
abv   
2018-03-25 15:39   
(The updated commit just improves some comments and output text in DRAW command)
(0074927)
bugmaster   
2018-03-26 15:30   
Combination -
OCCT branch : CR29064_2 SHA - 3dcc67cbe5ea1f61e4ea655b66894e296ff898da
Products branch : master SHA - da4f0e3aff0376d91aaa652cc2752ed2e0d41ab9
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: 18300.449999999917 / 18135.489999999976 [+0.91%]
Products
Total CPU difference: 7413.520000000004 / 7435.139999999992 [-0.29%]
Windows-64-VC10:
OCCT
Total CPU difference: 17931.394544098617 / 17864.39211459853 [+0.38%]
Products
Total CPU difference: 8190.348901899946 / 8129.77371359997 [+0.75%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0075313)
git   
2018-04-11 11:00   
Branch CR29064 has been deleted by kgv.

SHA-1: de3371130798b3bb733c1ba47e76a3baae8a4cc3
(0075314)
git   
2018-04-11 11:00   
Branch CR29064_1 has been deleted by kgv.

SHA-1: 902ec825e0c8a2039e484991b67c5d7a718e41ec
(0075315)
git   
2018-04-11 11:00   
Branch CR29064_2 has been deleted by kgv.

SHA-1: c33ced0b4f29277d05c56e3a92afd5666db7ae65