View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027192 | Open CASCADE | OCCT:Application Framework | public | 2016-02-19 14:48 | 2016-12-09 16:37 |
Reporter | vro | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2010 | ||
Product Version | 7.0.0 | ||||
Target Version | 7.1.0 | Fixed in Version | 7.1.0 | ||
Summary | 0027192: Improvement of storage of Ocaf document in XML file format | ||||
Description | Writing 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 Reproduce | A new test case is added: caf basic M4 | ||||
Tags | No tags attached. | ||||
Test case number | caf basic M4 | ||||
|
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 |
|
Dear Mpv, could you review the changes please: CR27192. |
|
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). |
|
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)); } |
|
Yes, I agree. Thanks for the improvement! |
|
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 |
|
Reviewed. |
|
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. |
|
Dear vro, Branch CR27192 has been rejected due to: - failed test-case for issue |
|
ice_video_20160229-152433.webm (1,685,333 bytes) |
|
Dear Mkv, the test-case works fine. Please see the attached video. Any remarks on the test-script is welcome. |
|
Spectacular! 8-O |
|
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]> |
|
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 |
|
Many thanks! Now I see the mistake. Fixed. |
|
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 |
|
Dear BugMaster, test case caf/basic/M4 now is OK. Branch CR27192 is TESTED. |
|
Branch CR27192 has been deleted by kgv. SHA-1: 8675a56adad6ff8ce9f30cc76bfb3b3800c78d4a |
occt: master e9947e12 2016-02-24 07:35:52 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 |
Affected Issues 0027192 |
|
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 |
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 | |
2016-02-24 12:25 | vro | Note Added: 0051079 | |
2016-02-25 08:59 |
|
Note Added: 0051096 | |
2016-02-25 08:59 |
|
Status | resolved => feedback |
2016-02-25 09:00 |
|
Note Edited: 0051096 | |
2016-02-25 09:00 |
|
Note Edited: 0051096 | |
2016-02-25 09:01 |
|
Note Edited: 0051096 | |
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 |
|
Note Added: 0051149 | |
2016-02-26 09:08 |
|
Assigned To | mpv => bugmaster |
2016-02-26 09:08 |
|
Status | resolved => reviewed |
2016-02-26 10:51 |
|
Assigned To | bugmaster => mkv |
2016-02-26 11:28 |
|
Test case number | => caf basic M4 |
2016-02-29 14:50 |
|
Note Added: 0051215 | |
2016-02-29 14:50 |
|
Note Added: 0051216 | |
2016-02-29 14:51 |
|
Assigned To | mkv => vro |
2016-02-29 14:51 |
|
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 |
|
Note Added: 0051227 | |
2016-02-29 17:18 |
|
Note Added: 0051228 | |
2016-02-29 17:18 |
|
Assigned To | mkv => vro |
2016-02-29 17:18 |
|
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 |
|
Note Added: 0051261 | |
2016-03-01 12:40 |
|
Assigned To | mkv => bugmaster |
2016-03-01 12:40 |
|
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 |
|
Status | verified => closed |
2016-12-09 16:37 |
|
Fixed in Version | => 7.1.0 |