MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027192Open CASCADE[OCCT] OCCT:Application Frameworkpublic2016-02-19 14:482016-12-09 16:37
Reportervro 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2010OS Version32 bit
Product Version[OCCT] 7.0.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0027192: Improvement of storage of Ocaf document in XML file format
DescriptionWriting of data of some Ocaf attributes in XML file format may be improved:
 - TDataStd_ExtStringArray writes <string>Hello, World!<\string> for each string in the array. It occupies much space on disk and makes reading/writing slower. A separator might be used to distinguish the strings written in one line (like for any other Ocaf array). Old documents should remain readable!
 - TDataStd_TreeNode writes a GUID even if it is a default GUID (obtained by the method GetDefaultTreeID()). The XML file would look better if a default GUID is skipped. Old documents containing the default GUID should remain readable!
Steps To ReproduceA new test case is added: caf basic M4
TagsNo tags attached.
Test case numbercaf basic M4
Attached Files? file icon ice_video_20160229-152433.webm (1,685,333 bytes) 2016-02-29 15:26

- Relationships

-  Notes
(0051070)
git (administrator)
2016-02-24 10:35

Branch CR27192 has been created by vro.

SHA-1: 4f676c8cb1409130897bee46f81b95d5c625771b


Detailed log of new commits:

Author: vro
Date: Wed Feb 24 10:35:52 2016 +0300

    0027192: Improvement of storage of Ocaf document in XML file format
(0051071)
vro (developer)
2016-02-24 10:39

Dear Mpv, could you review the changes please: CR27192.
(0051079)
vro (developer)
2016-02-24 12:25

The improvement gives the following advantage (measured for an external application, which uses XML file format for Ocaf documents):
 - size of file on disk: decreased for 30% ..50%.
 - speed of reading: about 20% .. 30% faster.
(speed of writing is not measured, may be later).
(0051096)
mpv (developer)
2016-02-25 08:59
edited on: 2016-02-25 09:01

I would prefer to change (in XmlMDataStd_ExtStringArrayDriver.cxx)

 Standard_Character c = '-';
 found = Contains(aExtStringArray, TCollection_ExtendedString(c));
 if (found)
 {
   c = '_';
   found = Contains(aExtStringArray, TCollection_ExtendedString(c));
   if (found)
   {
     c = '.';
     found = Contains(aExtStringArray, TCollection_ExtendedString(c));
     if (found)
     {
       c = ':';
       found = Contains(aExtStringArray, TCollection_ExtendedString(c));
       if (found)
       {
         c = '^';
         found = Contains(aExtStringArray, TCollection_ExtendedString(c));
         if (found)
         {
           c = '~';
           found = Contains(aExtStringArray, TCollection_ExtendedString(c));
         }
       }
     }
   }
 }

by the following piece of code (shorter, easier for C++ compiler optimization and may be simpler to extend and understand later):

 Standard_Character c = '-';
 static Standard_Character aPreferable[] = "-_.:^~";
 for(int anIndex = 0; found && aPreferable[anIndex]; anIndex++)
 {
   c = aPreferable[anIndex];
   found = Contains(aExtStringArray, TCollection_ExtendedString(c));
 }

(0051097)
vro (developer)
2016-02-25 09:01

Yes, I agree. Thanks for the improvement!
(0051105)
git (administrator)
2016-02-25 11:47

Branch CR27192 has been updated by vro.

SHA-1: d9cae5c91f71047abf800c16fdc709e9826d1f9c


Detailed log of new commits:

Author: vro
Date: Thu Feb 25 11:47:03 2016 +0300

    Improvement of code in XmlMDataStd_ExtStringArrayDriver.cxx

(0051149)
mpv (developer)
2016-02-26 09:08

Reviewed.
(0051215)
mkv (tester)
2016-02-29 14:50

Dear BugMaster,
Branch CR27192 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: d9cae5c91f71047abf800c16fdc709e9826d1f9c

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 41 (41 on master)
Windows: 0 (0 on master)

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27192-master-occt-64/Debian70-64/caf/basic/M4.html [^]
http://occt-tests/CR27192-master-occt-64/Windows-64-VC10/caf/basic/M4.html [^]
caf basic M4 : FAILED

Testing on Linux:
occt component :
Total MEMORY difference: 90062721 / 90544117 [-0.53%]
Total CPU difference: 19336.080000000067 / 19576.130000000107 [-1.23%]
products component :
Total MEMORY difference: 25903946 / 25872807 [+0.12%]
Total CPU difference: 5368.529999999991 / 5316.139999999985 [+0.99%]

Testing on Windows:
occt component :
Total MEMORY difference: 57369631 / 57104588 [+0.46%]
Total CPU difference: 18009.3482437997 / 17709.888724198754 [+1.69%]
products component :
Total MEMORY difference: 17514699 / 17401929 [+0.65%]
Total CPU difference: 5258.481707999974 / 5096.459069399955 [+3.18%]

There are no differences in images found by testdiff.
(0051216)
mkv (tester)
2016-02-29 14:50

Dear vro,
Branch CR27192 has been rejected due to:
- failed test-case for issue
(0051221)
vro (developer)
2016-02-29 15:27

Dear Mkv, the test-case works fine. Please see the attached video. Any remarks on the test-script is welcome.
(0051227)
abv (manager)
2016-02-29 16:20

Spectacular! 8-O
(0051228)
mkv (tester)
2016-02-29 17:18

Dear vro,
attached video is not correct, test-script is bad:

Draw[1]> Draw[2]> pwd
/misc/dn60/LocalWOK/wok_entities/LOC/dev/CR27192-master-occt-64
Draw[3]> cd tests
Draw[4]> cd caf
Draw[5]> set imagedir .
.
Draw[6]> source begin
Draw[7]> cd basic
Draw[8]> source begin
Draw[9]> source M4
There is not ./testextstrarr.xml file; SaveAs command: Error
caf basic M4: ERROR (Save failed)
framework DD not found
Draw[10]> cd ..
Draw[11]> source end
TEST COMPLETED
Draw[12]>
(0051247)
git (administrator)
2016-03-01 08:45

Branch CR27192 has been updated by vro.

SHA-1: c1e47e306ab399e9f96a57b88550794aa9de64b9


Detailed log of new commits:

Author: vro
Date: Tue Mar 1 08:45:44 2016 +0300

    Corrected test-script

(0051248)
vro (developer)
2016-03-01 08:46

Many thanks! Now I see the mistake. Fixed.
(0051260)
git (administrator)
2016-03-01 12:40

Branch CR27192 has been updated by mkv.

SHA-1: 8675a56adad6ff8ce9f30cc76bfb3b3800c78d4a


Detailed log of new commits:

Author: mkv
Date: Tue Mar 1 12:38:02 2016 +0300

    Small correction of test case for issue CR27192

(0051261)
mkv (tester)
2016-03-01 12:40

Dear BugMaster,
test case caf/basic/M4 now is OK.
Branch CR27192 is TESTED.
(0052907)
git (administrator)
2016-04-17 13:40

Branch CR27192 has been deleted by kgv.

SHA-1: 8675a56adad6ff8ce9f30cc76bfb3b3800c78d4a

- Related Changesets
occt: master e9947e12
Timestamp: 2016-02-24 07:35:52
Author: vro
Committer: bugmaster
Details ] Diff ]
0027192: Improvement of storage of Ocaf document in XML file format

Improvement of code in XmlMDataStd_ExtStringArrayDriver.cxx

Corrected test-script
mod - src/DDataStd/DDataStd_BasicCommands.cxx Diff ] File ]
mod - src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.cxx Diff ] File ]
mod - src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.cxx Diff ] File ]
add - tests/caf/basic/M4 Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-02-19 14:48 vro New Issue
2016-02-19 14:48 vro Assigned To => vro
2016-02-24 10:35 git Note Added: 0051070
2016-02-24 10:39 vro Note Added: 0051071
2016-02-24 10:39 vro Assigned To vro => mpv
2016-02-24 10:39 vro Status new => resolved
2016-02-24 10:39 vro Steps to Reproduce Updated View Revisions
2016-02-24 12:25 vro Note Added: 0051079
2016-02-25 08:59 mpv Note Added: 0051096
2016-02-25 08:59 mpv Status resolved => feedback
2016-02-25 09:00 mpv Note Edited: 0051096 View Revisions
2016-02-25 09:00 mpv Note Edited: 0051096 View Revisions
2016-02-25 09:01 mpv Note Edited: 0051096 View Revisions
2016-02-25 09:01 vro Note Added: 0051097
2016-02-25 11:47 git Note Added: 0051105
2016-02-25 14:20 vro Status feedback => resolved
2016-02-26 09:08 mpv Note Added: 0051149
2016-02-26 09:08 mpv Assigned To mpv => bugmaster
2016-02-26 09:08 mpv Status resolved => reviewed
2016-02-26 10:51 mkv Assigned To bugmaster => mkv
2016-02-26 11:28 mkv Test case number => caf basic M4
2016-02-29 14:50 mkv Note Added: 0051215
2016-02-29 14:50 mkv Note Added: 0051216
2016-02-29 14:51 mkv Assigned To mkv => vro
2016-02-29 14:51 mkv Status reviewed => assigned
2016-02-29 15:26 vro File Added: ice_video_20160229-152433.webm
2016-02-29 15:26 vro Assigned To vro => mkv
2016-02-29 15:27 vro Note Added: 0051221
2016-02-29 16:20 abv Note Added: 0051227
2016-02-29 17:18 mkv Note Added: 0051228
2016-02-29 17:18 mkv Assigned To mkv => vro
2016-02-29 17:18 mkv Status assigned => feedback
2016-03-01 08:45 git Note Added: 0051247
2016-03-01 08:46 vro Assigned To vro => mkv
2016-03-01 08:46 vro Note Added: 0051248
2016-03-01 12:40 git Note Added: 0051260
2016-03-01 12:40 mkv Note Added: 0051261
2016-03-01 12:40 mkv Assigned To mkv => bugmaster
2016-03-01 12:40 mkv Status feedback => tested
2016-04-08 11:55 bugmaster Changeset attached => occt master e9947e12
2016-04-08 11:55 bugmaster Status tested => verified
2016-04-08 11:55 bugmaster Resolution open => fixed
2016-04-17 13:40 git Note Added: 0052907
2016-12-09 16:33 user533 Status verified => closed
2016-12-09 16:37 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker