View Issue Details

IDProjectCategoryView StatusLast Update
0024788Open CASCADEOCCT:Foundation Classespublic2016-12-09 16:40
ReporterpdnAssigned Toapn  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.1.0 
Summary0024788: Foundation Classes - remove Dico_Dictionary
DescriptionDico_Dictionary and whole package implements functionality on binding generic data with the text strings. The strings are put into search tree and tree node is created for each character.

Such organization is not efficient for millions of strings. It is proposed to change Dico_Dictionaty to NCollection with the appropriate hasher.

The following actions are proposed:
1) To implement NCollection of strings
2) To use this collection in STEP interface
3) To check performance
4) To identify all the usages of Dico and use collection of strings instead.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Activities

git

2016-10-25 12:07

administrator   ~0059065

Branch CR24788 has been created by ski.

SHA-1: 801deab8b229d77fe3672408e8ea7798e7e8b8bd


Detailed log of new commits:

Author: ski
Date: Wed Oct 12 18:02:55 2016 +0300

    0024788: Remove Dico_Dictionary from OCC
    
    Class Dico_Dictionary was replaced by NCollection_DataMap.

git

2016-10-26 10:44

administrator   ~0059146

Branch CR24788 has been updated forcibly by ski.

SHA-1: 953ead8d78080e76dd901695f36aff8e8f350f4a

git

2016-10-26 10:46

administrator   ~0059147

Branch CR24788 has been updated forcibly by ski.

SHA-1: a27d420276d6557e8d085b1b9957f1869f4a2750

git

2016-10-26 10:55

administrator   ~0059150

Branch CR24788 has been updated by ski.

SHA-1: 5ae9d05dbc8c377c2c811bba71f0fa870dee8ab3


Detailed log of new commits:

Author: ski
Date: Wed Oct 12 18:02:55 2016 +0300

    Changed argument name in template class NCollection_Datamap to eliminate redefinitions of static members in dependent code.

kgv

2016-10-26 11:27

developer   ~0059153

Last edited: 2016-10-26 11:27

-  if (!thenames->GetItem(name.ToCString(),id)) {
+  if (!thenames.IsBound(name.ToCString())) {
     sout << " -- Item Unknown in File : " << name
       << " lineno " << thenl << " param." << nm << endl;
     id = 0;
+  } else {
+    id = thenames.Find(name.ToCString());

Hint for this and other places: the replacement for GetItem() should be
> if (!thenames.Find (name.ToCString(), id)) {
And it seems that ToCString() is redundant here (name is already TCollection_AsciiString).

git

2016-11-03 13:08

administrator   ~0059842

Branch CR24788 has been updated forcibly by ski.

SHA-1: af5dc262ee96e7673b07a6adfc1b64cbf62a20f6

ski

2016-11-03 13:13

developer   ~0059845

Dear abv,

OCCT branch CR24788 and PRODUCT branch CR24788 were created.

Package Dico was removed and replaced by NCollection_DataMap/NCollection_IndexedDataMap.

Documentation was updated.

Please, review.

abv

2016-11-03 18:44

manager   ~0059887

Looks reasonable, please test

pdn

2016-11-03 19:00

reporter   ~0059890

Minor remark, for STEP RWStepAP214_ReadWriteModule may be it would be good to put expected size of the map to avoid dynamic map extending.

kgv

2016-11-03 19:11

developer   ~0059891

Patch contains many occurrencies of double-lookups from the map that can be optimized.

+        if (aMapCountResult.IsBound(mess))
+          aMapCountResult.ChangeFind(mess)++;

[many similar occurrences]
if (Standard_Integer* aCounterPtr = aMapCountResult.ChangeSeek (mess))
  *aCounterPtr += 1;

+        Handle(TColStd_HSequenceOfInteger) alist;
+        if (aMapList.IsBound(mess))
+          alist = aMapList.ChangeFind(mess);
+        else {
+          alist = new TColStd_HSequenceOfInteger();
+          aMapList.Bind(mess, alist);

if (!aMapList.Find (mess, alist))
{
  alist = new TColStd_HSequenceOfInteger();
  aMapList.Bind(mess, alist);
}

git

2016-11-03 19:19

administrator   ~0059894

Branch CR24788 has been updated forcibly by mkv.

SHA-1: 3526c9cb1afa9d1ae20ebb1125bfdabb90c7e8d9

mkv

2016-11-07 13:40

tester   ~0059926

Dear BugMaster,
Branch CR4788 was rebased on current master of occt git-repository.
SHA-1: 3526c9cb1afa9d1ae20ebb1125bfdabb90c7e8d9
Branch CR4788 was rebased on current master of products git-repository.
SHA-1: 78ca277b016c95542c2190f307b1078fffd28eb8

mkv

2016-11-07 13:40

tester   ~0059927

Dear BugMaster,
Branch CR4788 from occt git-repository (and CR4788 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 3526c9cb1afa9d1ae20ebb1125bfdabb90c7e8d9
SHA-1: 78ca277b016c95542c2190f307b1078fffd28eb8

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 : 1150

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 88976422 / 91224905 [-2.46%]
Total CPU difference: 19318.38999999983 / 19514.21000000008 [-1.00%]
products component :
Total MEMORY difference: 29945323 / 30588723 [-2.10%]
Total CPU difference: 5269.259999999971 / 5278.629999999967 [-0.18%]

Testing on Windows:
occt component :
Total MEMORY difference: 55618074 / 57451773 [-3.19%]
Total CPU difference: 18317.4658188986 / 17672.82288659874 [+3.65%]
products component :
Total MEMORY difference: 20800908 / 21473188 [-3.13%]
Total CPU difference: 5226.953905899959 / 5107.691141399945 [+2.33%]

There are no differences in images found by testdiff.

mkv

2016-11-07 13:41

tester   ~0059928

Dear BugMaster,
Branch CR4788 is TESTED.

git

2016-12-07 11:30

administrator   ~0061229

Branch CR24788 has been deleted by kgv.

SHA-1: 3526c9cb1afa9d1ae20ebb1125bfdabb90c7e8d9

Related Changesets

occt: master 997e128f

2016-10-12 15:02:55

ski


Committer: apn Details Diff
0024788: Foundation Classes - remove Dico_Dictionary

Class Dico_Dictionary was replaced by NCollection_DataMap/NCollection_IndexedDataMap classes.
Changed argument name in template class NCollection_Datamap to eliminate redefinitions of static members in dependent code.
Affected Issues
0024788
mod - adm/UDLIST Diff File
mod - dox/dev_guides/upgrade/upgrade.md Diff File
rm - src/Dico/Dico_Dictionary.gxx Diff File
rm - src/Dico/Dico_DictionaryOfInteger.hxx Diff File
rm - src/Dico/Dico_DictionaryOfInteger_0.cxx Diff File
rm - src/Dico/Dico_DictionaryOfTransient.hxx Diff File
rm - src/Dico/Dico_DictionaryOfTransient_0.cxx Diff File
rm - src/Dico/Dico_Iterator.gxx Diff File
rm - src/Dico/Dico_IteratorOfDictionaryOfInteger.hxx Diff File
rm - src/Dico/Dico_IteratorOfDictionaryOfInteger_0.cxx Diff File
rm - src/Dico/Dico_IteratorOfDictionaryOfTransient.hxx Diff File
rm - src/Dico/Dico_IteratorOfDictionaryOfTransient_0.cxx Diff File
rm - src/Dico/Dico_StackItem.gxx Diff File
rm - src/Dico/Dico_StackItemOfDictionaryOfInteger.hxx Diff File
rm - src/Dico/Dico_StackItemOfDictionaryOfInteger_0.cxx Diff File
rm - src/Dico/Dico_StackItemOfDictionaryOfTransient.hxx Diff File
rm - src/Dico/Dico_StackItemOfDictionaryOfTransient_0.cxx Diff File
rm - src/Dico/FILES Diff File
mod - src/IFSelect/IFSelect_Activator.cxx Diff File
mod - src/IFSelect/IFSelect_Editor.cxx Diff File
mod - src/IFSelect/IFSelect_Editor.hxx Diff File
mod - src/IFSelect/IFSelect_SessionFile.cxx Diff File
mod - src/IFSelect/IFSelect_SessionFile.hxx Diff File
mod - src/IFSelect/IFSelect_SignatureList.cxx Diff File
mod - src/IFSelect/IFSelect_SignatureList.hxx Diff File
mod - src/IFSelect/IFSelect_WorkSession.cxx Diff File
mod - src/IFSelect/IFSelect_WorkSession.hxx Diff File
mod - src/IGESControl/IGESControl_Reader.cxx Diff File
mod - src/IGESSelect/IGESSelect_CounterOfLevelNumber.cxx Diff File
mod - src/Interface/Interface_InterfaceModel.cxx Diff File
mod - src/Interface/Interface_MSG.cxx Diff File
mod - src/Interface/Interface_Static.cxx Diff File
mod - src/Interface/Interface_Static.hxx Diff File
mod - src/Interface/Interface_TypedValue.cxx Diff File
mod - src/Interface/Interface_TypedValue.hxx Diff File
mod - src/MoniTool/MoniTool_AttrList.cxx Diff File
mod - src/MoniTool/MoniTool_AttrList.hxx Diff File
mod - src/MoniTool/MoniTool_CaseData.cxx Diff File
mod - src/MoniTool/MoniTool_TypedValue.cxx Diff File
mod - src/MoniTool/MoniTool_TypedValue.hxx Diff File
mod - src/NCollection/NCollection_DataMap.hxx Diff File
mod - src/QABugs/QABugs_3.cxx Diff File
mod - src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx Diff File
mod - src/ShapeProcess/FILES Diff File
mod - src/ShapeProcess/ShapeProcess.cxx Diff File
mod - src/ShapeProcess/ShapeProcess.hxx Diff File
rm - src/ShapeProcess/ShapeProcess_DictionaryOfOperator.hxx Diff File
rm - src/ShapeProcess/ShapeProcess_DictionaryOfOperator_0.cxx Diff File
rm - src/ShapeProcess/ShapeProcess_IteratorOfDictionaryOfOperator.hxx Diff File
rm - src/ShapeProcess/ShapeProcess_IteratorOfDictionaryOfOperator_0.cxx Diff File
rm - src/ShapeProcess/ShapeProcess_StackItemOfDictionaryOfOperator.hxx Diff File
rm - src/ShapeProcess/ShapeProcess_StackItemOfDictionaryOfOperator_0.cxx Diff File
mod - src/STEPCAFControl/FILES Diff File
rm - src/STEPCAFControl/STEPCAFControl_DictionaryOfExternFile.hxx Diff File
rm - src/STEPCAFControl/STEPCAFControl_DictionaryOfExternFile_0.cxx Diff File
rm - src/STEPCAFControl/STEPCAFControl_IteratorOfDictionaryOfExternFile.hxx Diff File
rm - src/STEPCAFControl/STEPCAFControl_IteratorOfDictionaryOfExternFile_0.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Reader.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Reader.hxx Diff File
rm - src/STEPCAFControl/STEPCAFControl_StackItemOfDictionaryOfExternFile.hxx Diff File
rm - src/STEPCAFControl/STEPCAFControl_StackItemOfDictionaryOfExternFile_0.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Writer.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Writer.hxx Diff File
mod - src/StepData/StepData_ESDescr.cxx Diff File
mod - src/StepData/StepData_ESDescr.hxx Diff File
mod - src/StepData/StepData_FreeFormEntity.cxx Diff File
mod - src/StepData/StepData_Protocol.cxx Diff File
mod - src/StepData/StepData_Protocol.hxx Diff File
mod - src/TKernel/PACKAGES Diff File
mod - src/Transfer/Transfer_Finder.cxx Diff File
mod - src/Transfer/Transfer_Finder.hxx Diff File
mod - src/Transfer/Transfer_TransferProcess.gxx Diff File
mod - src/Transfer/Transfer_TransientProcess.cxx Diff File
mod - src/Transfer/Transfer_TransientProcess.hxx Diff File
mod - src/XDEDRAW/XDEDRAW_Common.cxx Diff File
mod - src/XSControl/XSControl_Controller.cxx Diff File
mod - src/XSControl/XSControl_Controller.hxx Diff File
mod - src/XSControl/XSControl_Functions.cxx Diff File
mod - src/XSControl/XSControl_TransferReader.cxx Diff File
mod - src/XSControl/XSControl_TransferReader.hxx Diff File
mod - src/XSControl/XSControl_Vars.cxx Diff File
mod - src/XSControl/XSControl_Vars.hxx Diff File
mod - src/XSControl/XSControl_WorkSession.cxx Diff File
mod - src/XSControl/XSControl_WorkSession.hxx Diff File
mod - src/XSDRAW/XSDRAW.cxx Diff File

Issue History

Date Modified Username Field Change
2014-04-02 12:46 pdn New Issue
2014-04-02 12:46 pdn Assigned To => abv
2014-09-12 14:31 abv Target Version => 7.0.0
2015-12-14 22:39 abv Target Version 7.0.0 => 7.1.0
2016-09-23 14:06 abv Assigned To abv => ski
2016-09-23 14:06 abv Status new => assigned
2016-10-25 12:07 git Note Added: 0059065
2016-10-26 10:44 git Note Added: 0059146
2016-10-26 10:46 git Note Added: 0059147
2016-10-26 10:55 git Note Added: 0059150
2016-10-26 11:19 kgv Summary Remove Dico_Dictionary from OCC => Foundation Classes - remove Dico_Dictionary
2016-10-26 11:27 kgv Note Added: 0059153
2016-10-26 11:27 kgv Note Edited: 0059153
2016-11-03 13:08 git Note Added: 0059842
2016-11-03 13:13 ski Note Added: 0059845
2016-11-03 13:13 ski Assigned To ski => abv
2016-11-03 13:13 ski Status assigned => resolved
2016-11-03 13:13 ski Steps to Reproduce Updated
2016-11-03 18:44 abv Note Added: 0059887
2016-11-03 18:44 abv Assigned To abv => bugmaster
2016-11-03 18:44 abv Status resolved => reviewed
2016-11-03 18:52 mkv Assigned To bugmaster => mkv
2016-11-03 19:00 pdn Note Added: 0059890
2016-11-03 19:11 kgv Note Added: 0059891
2016-11-03 19:19 git Note Added: 0059894
2016-11-07 13:40 mkv Note Added: 0059926
2016-11-07 13:40 mkv Note Added: 0059927
2016-11-07 13:41 mkv Note Added: 0059928
2016-11-07 13:41 mkv Assigned To mkv => bugmaster
2016-11-07 13:41 mkv Status reviewed => tested
2016-11-07 13:41 mkv Test case number => Not needed
2016-11-09 17:43 apn Changeset attached => occt master 997e128f
2016-11-09 17:43 apn Assigned To bugmaster => apn
2016-11-09 17:43 apn Status tested => verified
2016-11-09 17:43 apn Resolution open => fixed
2016-12-07 11:30 git Note Added: 0061229
2016-12-09 16:29 aiv Status verified => closed
2016-12-09 16:40 aiv Fixed in Version => 7.1.0