MantisBT - Open CASCADE
View Issue Details
0030904Open CASCADE[OCCT] OCCT:Visualizationpublic2019-08-19 07:572020-02-01 21:47
nds 
kgv 
normalfeature 
verifiedfixed 
 
[OCCT] 7.5.0* 
Not required
0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind
Update with defined type of memory computation is required.

It's too expensive calling computation for all kinds of memory any time.
Some time we want to follow by only one parameter (having in mind that this is not full/enough information).
No tags attached.
has duplicate 0031316new nds Foundation Classes - OSD_MemInfo parameter to set active metrics 
png perf_meminfo.png (20,722) 2019-08-19 13:58
https://tracker.dev.opencascade.org/
Issue History
2019-08-19 07:57ndsNew Issue
2019-08-19 07:57ndsAssigned To => kgv
2019-08-19 08:29ndsAssigned Tokgv => nds
2019-08-19 09:08kgvNote Added: 0086325
2019-08-19 10:06ndsNote Added: 0086328
2019-08-19 10:15kgvNote Added: 0086329
2019-08-19 13:58gitNote Added: 0086330
2019-08-19 13:58ndsFile Added: perf_meminfo.png
2019-08-20 12:36gitNote Added: 0086362
2019-09-05 11:44ndsTarget Version7.4.0 => 7.5.0*
2020-01-23 17:18kgvRelationship addedhas duplicate 0031316
2020-01-23 17:23gitNote Added: 0090027
2020-01-27 17:48gitNote Added: 0090079
2020-01-27 20:30gitNote Added: 0090083
2020-01-28 10:05ndsNote Added: 0090087
2020-01-28 10:05ndsAssigned Tonds => kgv
2020-01-28 10:05ndsStatusnew => resolved
2020-01-28 10:56kgvNote Added: 0090089
2020-01-28 10:57kgvAssigned Tokgv => nds
2020-01-28 10:57kgvStatusresolved => assigned
2020-01-28 15:05gitNote Added: 0090099
2020-01-28 17:21ndsNote Added: 0090104
2020-01-28 17:21ndsAssigned Tonds => kgv
2020-01-28 17:21ndsStatusassigned => resolved
2020-01-28 17:57kgvNote Added: 0090107
2020-01-28 18:06gitNote Added: 0090108
2020-01-28 19:38kgvAssigned Tokgv => bugmaster
2020-01-28 19:38kgvStatusresolved => reviewed
2020-01-28 19:38kgvSeverityminor => feature
2020-01-29 12:35gitNote Added: 0090132
2020-01-29 12:41gitNote Added: 0090136
2020-01-30 19:00bugmasterTest case number => Not required
2020-01-31 18:02bugmasterNote Added: 0090242
2020-01-31 18:02bugmasterStatusreviewed => tested
2020-02-01 21:28kgvChangeset attached => occt master 1939cfd9
2020-02-01 21:28kgvAssigned Tobugmaster => kgv
2020-02-01 21:28kgvStatustested => verified
2020-02-01 21:28kgvResolutionopen => fixed
2020-02-01 21:47gitNote Added: 0090265
2020-02-01 21:47gitNote Added: 0090268
2020-02-01 21:47gitNote Added: 0090270

Notes
(0086325)
kgv   
2019-08-19 09:08   
I don't think updating most of parameters could cause any performance issues.
Rather one parameter has known issues - heap computation using MSVC runtime (sometimes it might even throw some exceptions in Debug builds).
(0086328)
nds   
2019-08-19 10:06   
This method is called in a cycle, Release mode, MSVC.
Update() for all parameters takes lots of time,
Update(MemPrivate) much better.
(0086329)
kgv   
2019-08-19 10:15   
> Update() for all parameters takes lots of time,
> Update(MemPrivate) much better.
It would be nice adding (elapsed) numbers to the bug.
(0086330)
git   
2019-08-19 13:58   
Branch CR30904 has been created by nds.

SHA-1: 93587f87c71f9781ef6723ecc9ac7df26ba84090


Detailed log of new commits:

Author: nds
Date: Mon Aug 19 13:55:45 2019 +0300

    0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind
(0086362)
git   
2019-08-20 12:36   
Branch CR30904 has been updated by nds.

SHA-1: a357492f5b534edfac88a97dbd0ba15662b6e0e8


Detailed log of new commits:

Author: nds
Date: Tue Aug 20 12:34:21 2019 +0300

    0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind

(0090027)
git   
2020-01-23 17:23   
Branch CR30904_1 has been created by nds.

SHA-1: fb206404a0c30b8c4994d8369e77067c0b23bf11


Detailed log of new commits:

Author: nds
Date: Thu Jan 23 17:15:36 2020 +0300

    0031316: Visualization - OSD_MemInfo parameter to set active metrics
    
    (cherry picked from commit 434ff116dbbc72a10ca990c0baff0d45686d85d8)
(0090079)
git   
2020-01-27 17:48   
Branch CR30904_2 has been created by nds.

SHA-1: 9678bdf2732d29de3e9972ca3e85ab92f055778e


Detailed log of new commits:

Author: nds
Date: Mon Jan 27 17:44:33 2020 +0300

    0031316: Visualization - OSD_MemInfo parameter to set active metrics
(0090083)
git   
2020-01-27 20:30   
Branch CR30904_2 has been updated by nds.

SHA-1: d0130ae5330b8fe8214e6e404eeb7346ca60db51


Detailed log of new commits:

Author: nds
Date: Mon Jan 27 20:26:49 2020 +0300

    0031316: Visualization - OSD_MemInfo parameter to set active metrics

(0090087)
nds   
2020-01-28 10:05   
Dear Kirill,

please, review.
Jenkins Job: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30904_1-master-NDS/ [^]

Thank you in advance, Natalia
(0090089)
kgv   
2020-01-28 10:56   
The patch refers to another bug 0031316 (please fix commit description on branch name), where the comment has been put:
+  NCollection_Map<OSD_MemInfo::Counter> myActiveCounters;

I propose using "bool myActiveCounters[MemCounter_NB]" instead of a map.

+Standard_Boolean OSD_MemInfo::hasValue (const OSD_MemInfo::Counter theCounter) const
+{
+  return IsActiveCounter (theCounter) && myCounters[theCounter] != Standard_Size(-1);
+}

Please inline.

+      if (IsActiveCounter (MemVirtual))
       myCounters[MemVirtual] = atol (aBuff + strlen ("VmSize:")) * 1024;

Please add brackets and indent.
(0090099)
git   
2020-01-28 15:05   
Branch CR30904_3 has been created by nds.

SHA-1: 858b15f93f68d9e8605b2940f9b200691f438cf1


Detailed log of new commits:

Author: nds
Date: Tue Jan 28 15:01:42 2020 +0300

    0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind
(0090104)
nds   
2020-01-28 17:21   
Dear Kirill,

It is corrected. Please, note the interface has changed to SetActive/IsActive.
Please, review.
Jenkins job is the same.

Best regards, Natalia
(0090107)
kgv   
2020-01-28 17:57   
     if (strncmp (aBuff, "VmSize:", strlen ("VmSize:")) == 0)
     {
-      myCounters[MemVirtual] = atol (aBuff + strlen ("VmSize:")) * 1024;
+      if (IsActive (MemVirtual))

It looks confusing comparing string before checking a bool.
(0090108)
git   
2020-01-28 18:06   
Branch CR30904_4 has been created by kgv.

SHA-1: 1939cfd9cbb164c4cc993bd66dfe5ab008e52c33


Detailed log of new commits:

Author: nds
Date: Tue Jan 28 15:01:42 2020 +0300

    0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind
    
    Added method OSD_MemInfo::SetActive() for disabling specific counter.
(0090132)
git   
2020-01-29 12:35   
Branch CR30904_3 has been deleted by nds.

SHA-1: 858b15f93f68d9e8605b2940f9b200691f438cf1
(0090136)
git   
2020-01-29 12:41   
Branch CR30904_2 has been deleted by nds.

SHA-1: d0130ae5330b8fe8214e6e404eeb7346ca60db51
(0090242)
bugmaster   
2020-01-31 18:02   
Combination -
OCCT branch : CR30904_3
master SHA - 858b15f93f68d9e8605b2940f9b200691f438cf1
fe4497f3246e6bc1ced97ac331c148f0809ded15
Products branch : master SHA - 78d1418219e11e1effe871d7f2886b736d7b8bdf
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:
Debian80-64:
OCCT
Total CPU difference: 17054.310000000023 / 17032.770000000073 [+0.13%]
Products
Total CPU difference: 12142.140000000081 / 12148.700000000104 [-0.05%]
Windows-64-VC14:
OCCT
---
Products
Total CPU difference: 14190.84375 / 14126.28125 [+0.46%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0090265)
git   
2020-02-01 21:47   
Branch CR30904_4 has been deleted by inv.

SHA-1: 1939cfd9cbb164c4cc993bd66dfe5ab008e52c33
(0090268)
git   
2020-02-01 21:47   
Branch CR30904_1 has been deleted by inv.

SHA-1: fb206404a0c30b8c4994d8369e77067c0b23bf11
(0090270)
git   
2020-02-01 21:47   
Branch CR30904 has been deleted by inv.

SHA-1: a357492f5b534edfac88a97dbd0ba15662b6e0e8