mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0023850: TDataStd_ByteArray is too slow on storage on disk
Optimization of a byte-array for XML persistence (binary persistence is ok). A possible bug is corrected (size of an array is extended a little). Same improvement for storage of a TDataStd_TreeNode. Improvement of speed of storage of several Ocaf attributes in XML file format. Also, format of storage of a double value is extended to keep 17 digits after a decimal point (it was used only 15 digits before). Several draw-commands are added to manipulate the basic Ocaf attributes: BooleanArray BooleanList IntegerList RealList A test-script for OCAF document successfully saved and opened from disk in XML file format. + 1 is added to keep '\0' Removed several spaces in source files. PLib_LocalArray is renamed to NCollection_LocalArray and became a template. It is used as a local array for Standard_Character in XML OCAF drivers, and as a local array of Standard_Real in PLib package. Small correction of test case for this fix
This commit is contained in:
@@ -84,7 +84,7 @@ void XmlMDataStd_RealDriver::Paste (const Handle(TDF_Attribute)& theSource,
|
||||
TCollection_AsciiString aValueStr (anInt->Get());
|
||||
#else
|
||||
char aValueChar[32];
|
||||
Sprintf(aValueChar, "%.15g", anInt->Get());
|
||||
Sprintf(aValueChar, "%.17g", anInt->Get());
|
||||
TCollection_AsciiString aValueStr(aValueChar);
|
||||
#endif
|
||||
// No occurrence of '&', '<' and other irregular XML characters
|
||||
|
Reference in New Issue
Block a user