View Issue Details

IDProjectCategoryView StatusLast Update
0030904Open CASCADEOCCT:Visualizationpublic2020-12-02 17:12
Reporternds Assigned Tokgv  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind
DescriptionUpdate 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).
TagsNo tags attached.
Test case numberNot required

Attached Files

  • perf_meminfo.png (20,722 bytes)

Relationships

has duplicate 0031316 closedbugmaster Foundation Classes - OSD_MemInfo parameter to set active metrics 

Activities

kgv

2019-08-19 09:08

developer   ~0086325

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).

nds

2019-08-19 10:06

developer   ~0086328

This method is called in a cycle, Release mode, MSVC.
Update() for all parameters takes lots of time,
Update(MemPrivate) much better.

kgv

2019-08-19 10:15

developer   ~0086329

> Update() for all parameters takes lots of time,
> Update(MemPrivate) much better.
It would be nice adding (elapsed) numbers to the bug.

git

2019-08-19 13:58

administrator   ~0086330

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

nds

2019-08-19 13:58

developer  

perf_meminfo.png (20,722 bytes)

git

2019-08-20 12:36

administrator   ~0086362

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

git

2020-01-23 17:23

administrator   ~0090027

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)

git

2020-01-27 17:48

administrator   ~0090079

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

git

2020-01-27 20:30

administrator   ~0090083

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

nds

2020-01-28 10:05

developer   ~0090087

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

kgv

2020-01-28 10:56

developer   ~0090089

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.

git

2020-01-28 15:05

administrator   ~0090099

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

nds

2020-01-28 17:21

developer   ~0090104

Dear Kirill,

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

Best regards, Natalia

kgv

2020-01-28 17:57

developer   ~0090107

     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.

git

2020-01-28 18:06

administrator   ~0090108

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.

git

2020-01-29 12:35

administrator   ~0090132

Branch CR30904_3 has been deleted by nds.

SHA-1: 858b15f93f68d9e8605b2940f9b200691f438cf1

git

2020-01-29 12:41

administrator   ~0090136

Branch CR30904_2 has been deleted by nds.

SHA-1: d0130ae5330b8fe8214e6e404eeb7346ca60db51

bugmaster

2020-01-31 18:02

administrator   ~0090242

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

git

2020-02-01 21:47

administrator   ~0090265

Branch CR30904_4 has been deleted by inv.

SHA-1: 1939cfd9cbb164c4cc993bd66dfe5ab008e52c33

git

2020-02-01 21:47

administrator   ~0090268

Branch CR30904_1 has been deleted by inv.

SHA-1: fb206404a0c30b8c4994d8369e77067c0b23bf11

git

2020-02-01 21:47

administrator   ~0090270

Branch CR30904 has been deleted by inv.

SHA-1: a357492f5b534edfac88a97dbd0ba15662b6e0e8

Related Changesets

occt: master 1939cfd9

2020-01-28 12:01:42

nds


Committer: kgv Details Diff
0030904: Visualization - OSD_MemInfo provide Update with parameter of computation kind

Added method OSD_MemInfo::SetActive() for disabling specific counter.
Affected Issues
0030904
mod - src/Draw/Draw_BasicCommands.cxx Diff File
mod - src/OSD/OSD_MemInfo.cxx Diff File
mod - src/OSD/OSD_MemInfo.hxx Diff File

Issue History

Date Modified Username Field Change
2019-08-19 07:57 nds New Issue
2019-08-19 07:57 nds Assigned To => kgv
2019-08-19 08:29 nds Assigned To kgv => nds
2019-08-19 09:08 kgv Note Added: 0086325
2019-08-19 10:06 nds Note Added: 0086328
2019-08-19 10:15 kgv Note Added: 0086329
2019-08-19 13:58 git Note Added: 0086330
2019-08-19 13:58 nds File Added: perf_meminfo.png
2019-08-20 12:36 git Note Added: 0086362
2019-09-05 11:44 nds Target Version 7.4.0 => 7.5.0
2020-01-23 17:18 kgv Relationship added has duplicate 0031316
2020-01-23 17:23 git Note Added: 0090027
2020-01-27 17:48 git Note Added: 0090079
2020-01-27 20:30 git Note Added: 0090083
2020-01-28 10:05 nds Note Added: 0090087
2020-01-28 10:05 nds Assigned To nds => kgv
2020-01-28 10:05 nds Status new => resolved
2020-01-28 10:56 kgv Note Added: 0090089
2020-01-28 10:57 kgv Assigned To kgv => nds
2020-01-28 10:57 kgv Status resolved => assigned
2020-01-28 15:05 git Note Added: 0090099
2020-01-28 17:21 nds Note Added: 0090104
2020-01-28 17:21 nds Assigned To nds => kgv
2020-01-28 17:21 nds Status assigned => resolved
2020-01-28 17:57 kgv Note Added: 0090107
2020-01-28 18:06 git Note Added: 0090108
2020-01-28 19:38 kgv Assigned To kgv => bugmaster
2020-01-28 19:38 kgv Status resolved => reviewed
2020-01-28 19:38 kgv Severity minor => feature
2020-01-29 12:35 git Note Added: 0090132
2020-01-29 12:41 git Note Added: 0090136
2020-01-30 19:00 bugmaster Test case number => Not required
2020-01-31 18:02 bugmaster Note Added: 0090242
2020-01-31 18:02 bugmaster Status reviewed => tested
2020-02-01 21:28 kgv Changeset attached => occt master 1939cfd9
2020-02-01 21:28 kgv Assigned To bugmaster => kgv
2020-02-01 21:28 kgv Status tested => verified
2020-02-01 21:28 kgv Resolution open => fixed
2020-02-01 21:47 git Note Added: 0090265
2020-02-01 21:47 git Note Added: 0090268
2020-02-01 21:47 git Note Added: 0090270
2020-12-02 16:40 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed